Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/logbot.py
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-11-27 13:22:46 +0100
committerErich Eckner <git@eckner.net>2019-11-27 13:22:46 +0100
commit5d50bb028fa8965c78f86d0d329313401fd1c3cd (patch)
tree40c1c82634c1ab0dde948755ae690846cd43d503 /logbot.py
parent7e8c1fb2c8b3cc4559b6c18366c5b787c1ea3b63 (diff)
logbot.py: save symlink to latest logs, too
Diffstat (limited to 'logbot.py')
-rwxr-xr-xlogbot.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/logbot.py b/logbot.py
index 1178008..23067dd 100755
--- a/logbot.py
+++ b/logbot.py
@@ -347,6 +347,9 @@ class Logbot(SingleServerIRCBot):
# Create the log date index if it doesnt exist
if not os.path.exists(log_path):
write_string(log_path, html_header.replace("%title%", "%s | Logs for %s" % (channel_title, date)))
+ if os.path.islink("%s/latest.html" % chan_path):
+ os.unlink("%s/latest.html" % chan_path)
+ os.symlink(log_path, "%s/latest.html" % chan_path)
# Append date log
append_line("%s/index.html" % chan_path, '<a href="%s.html">%s</a>' % (date, date))