feat: show commit info in footer

This commit is contained in:
2025-04-10 09:09:20 +02:00
parent 21cd2c05a6
commit 5c149761e3
5 changed files with 26 additions and 4 deletions

View File

@@ -0,0 +1,10 @@
from git import Repo # hash ostatniego commitu
def getCommit():
repo = "<p>Brak informacji o wersji skryptu</p>"
try:
repo = Repo(search_parent_directories=True).head.object.hexsha
repo = f"<p>Commit: <a href='https://gitea.7o7.cx/roberteam/lewangoalski/commit/{repo}' style='width: 50%'>{repo[:11]}</a></p>"
except:
pass
return repo