Skip to content

Commit

Permalink
update github page generator to include last commit time
Browse files Browse the repository at this point in the history
  • Loading branch information
bushshrub committed Jul 24, 2024
1 parent 1355314 commit 391a827
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions generate_gh_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
f.write("<html>\n<body>\n")
f.write("<h1>Algebra Book Build Files</h1>\n")
current_git_commit_hash = os.popen("git rev-parse --short HEAD").read().strip()
last_commit_dt = os.popen('git log -1 --date=format:"%Y/%m/%d %T" --format="%ad"').read().strip()
f.write(f"<p>Current git commit hash: {current_git_commit_hash}</p>\n")
f.write(f"<p>Last commit time: {last_commit_dt}</p>\n")

f.write('<a href="files/main.pdf">Main Document</a>\n')
f.write('<ul>')
Expand Down

0 comments on commit 391a827

Please sign in to comment.