Skip to content

Commit edb8a61

Browse files
committed
Add Author info
1 parent 24af576 commit edb8a61

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

_tpl/post-footer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1+
12
### Footer:
23

34
<center> Powered By <a href="https://github.com/Sep0lkit/git-issues-blog">git-issues-blog</a></center>
4-

git-issues-blog.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env python3
2-
''' Create Issue From File '''
2+
3+
# Author: Sep0lkit
4+
# Github: https://github.com/Sep0lkit/git-issues-blo
5+
36
import os
47
import re
58
import json
@@ -51,9 +54,6 @@
5154
print('no changed file found')
5255
CHANGED = []
5356

54-
print("changed file: ")
55-
print(CHANGED)
56-
5757
p = pathlib.Path(POSTS_PATH)
5858
for f in p.rglob('*.md'):
5959
if len(CHANGED) != 0:
@@ -63,6 +63,9 @@
6363
else:
6464
POSTS.append(f)
6565

66+
print("posts need update: ")
67+
print(POSTS)
68+
6669
header = pathlib.Path('_tpl/post-header.md')
6770
if header.exists():
6871
issue_header = header.read_text()
@@ -84,9 +87,9 @@
8487

8588
# relative link to raw.github link
8689
re_format = "![\\1](https://raw.githubusercontent.com/{}/{}/{}/\\2)".format(GITHUB_REPO, GITHUB_BRANCH, p.parent.as_posix())
87-
issue_body_new = re.sub(r'!\[(.*)\]\((?!http)(.*)\)', re_format, issue_body, flags = re.M)
90+
issue_body_with_giturl = re.sub(r'!\[(.*)\]\((?!http)(.*)\)', re_format, issue_body, flags = re.M)
8891

89-
issue_content = issue_header + issue_body_new + issue_footer
92+
issue_content = issue_header + issue_body_with_giturl + issue_footer
9093

9194
# check file exist issue or not by title(POSTS_PATH)
9295
pstr = p.as_posix()

git-issues-blog.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
#install jq
1+
# Author: Sep0lkit
2+
# Github: https://github.com/Sep0lkit/git-issues-blog
3+
4+
# install jq
25
sudo apt-get -y install jq
36

4-
#changed file list
7+
# changed file list
58
commit=`cat _index | jq -r .__commit__`
69
echo $commit
710
if [ -n "$commit" ]; then
8-
echo "output git changed file list..."
911
git config --global core.quotepath false
1012
git diff --name-only $commit > git_diff_files.txt
13+
echo "posts will be update: "
14+
cat git_diff_files.txt
1115
else
12-
echo "no commit found, change all"
16+
echo "no commit found, all posts will be update: "
1317
echo '' > git_diff_files.txt
1418
fi

0 commit comments

Comments
 (0)