From 5d50bb028fa8965c78f86d0d329313401fd1c3cd Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 27 Nov 2019 13:22:46 +0100 Subject: logbot.py: save symlink to latest logs, too --- logbot.py | 3 +++ 1 file changed, 3 insertions(+) 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, '%s' % (date, date)) -- cgit v1.2.3