summaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
authorSimon Rettberg2019-02-04 15:47:41 +0100
committerSimon Rettberg2019-02-04 15:47:41 +0100
commitdafa62e4e35c2d432fda97d7561e66f5522ccccd (patch)
tree40c42bd09dc22e63ab859025209df03293518729 /main.py
parentFix extremely stretched layout with only few items (diff)
downloadbwlp-monitoring-dafa62e4e35c2d432fda97d7561e66f5522ccccd.tar.gz
bwlp-monitoring-dafa62e4e35c2d432fda97d7561e66f5522ccccd.tar.xz
bwlp-monitoring-dafa62e4e35c2d432fda97d7561e66f5522ccccd.zip
Write update timestamp to html output
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.py b/main.py
index 61c5159..ea13990 100755
--- a/main.py
+++ b/main.py
@@ -261,10 +261,11 @@ for entry in reversed(logEntries[cut_amount:]):
+ entry.msg + '</div></div></div>')
# Replace the %CONTENT% in the template with the actual html code.
+now = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
html = open('template.html')
html2 = open('status.html', 'w')
for line in html:
- html2.write(line.replace('%CONTENT%', code).replace('%LOG%', log))
+ html2.write(line.replace('%CONTENT%', code).replace('%LOG%', log).replace('%NOW%', now))
html.close()
html2.close()