We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 285d142 commit 89bcc3aCopy full SHA for 89bcc3a
parse_git_log.py
@@ -0,0 +1,22 @@
1
+'''
2
+This document helps use parse our git commits so we
3
+can make them more easily readable and clickable
4
+in our Readme.
5
6
+
7
+import os
8
+import datetime
9
+import git # pip install GitPython
10
11
12
+repo = git.Repo(os.getcwd())
13
14
+master = repo.head.reference
15
16
+with open("parsed_log.md", "w+") as parsed_log:
17
+ for commit in master.log():
18
+ if "commit" in commit.message:
19
+ commit_mess = commit.message.replace("commit: ", "").replace("commit (initial): ", "")
20
+ line = "[{message}](../../tree/{commit}/)".format(message=commit_mess, commit=commit.newhexsha)
21
+ parsed_log.write(line)
22
+ parsed_log.write("\n\n")
0 commit comments