➕ New commit message prettyfier that i kidna like
This commit is contained in:
parent
9bf4048313
commit
ca5e93ffc8
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,3 +16,4 @@ docs/public/
|
||||
keys/
|
||||
|
||||
chan-like/target/
|
||||
commit-message.tmp
|
||||
|
34
git-doc.py
Normal file
34
git-doc.py
Normal file
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user