diff --git a/.gitignore b/.gitignore index 4e1e61e..12ac9be 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ docs/public/ keys/ chan-like/target/ +commit-message.tmp diff --git a/git-doc.py b/git-doc.py new file mode 100644 index 0000000..907d580 --- /dev/null +++ b/git-doc.py @@ -0,0 +1,34 @@ +''' +Additions: + +Modifications: * +Removals: - +Note/Warning ! +''' + +import sys + +TMP_MSG_FILE = 'tmp-commit-file' + +lines = [] + +for line in sys.stdin: + line = line.strip() + if line.startswith('+'): + line = '➕' + line[1:] + + elif line.startswith('-'): + line = '➖' + line[1:] + + elif line.startswith('*'): + line = '✨' + line[1:] + + elif line.startswith('!'): + line = '❗' + line[1:] + + lines.append(line) + +with open(TMP_MSG_FILE, 'w') as target: + for line in lines: + print(line, file=target) + +