summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-12-27 11:21:54 +0200
committerLars Wirzenius <liw@liw.fi>2023-12-27 11:21:54 +0200
commit535ab07c79478b017872f07aae2283735ef8c50f (patch)
tree74e5af749a46b74f027b04fb764c163fb26a81f4
parent473e2c4ffd84849fa21533f82ffbc11fc94723a1 (diff)
downloadwumpus-hunter-535ab07c79478b017872f07aae2283735ef8c50f.tar.gz
feat: explanatory text
Signed-off-by: Lars Wirzenius <liw@liw.fi>
-rwxr-xr-xwumpus-hunter13
1 files changed, 11 insertions, 2 deletions
diff --git a/wumpus-hunter b/wumpus-hunter
index aa3dcc8..164da28 100755
--- a/wumpus-hunter
+++ b/wumpus-hunter
@@ -16,6 +16,14 @@ RUN_LOG_DIR = os.path.expanduser("~")
STATS_FILE = os.path.expanduser("~/stats.txt")
COUNTS_FILE = os.path.expanduser("~/counts.txt")
+EXPLANATION_HTML = """
+<p>Results of running the Radicle <code>heartwood</code> repeatedly.
+Counts of success/failure per commit.
+First count is successful, second failed runs.
+Failure count is a link to logs from failed run, if any.
+Only logs from failed runs are kept.
+"""
+
def parse_args():
p = argparse.ArgumentParser()
@@ -191,8 +199,7 @@ def count(counts, stats):
f.write("<title>Radicle Wumpus hunter</title>\n")
f.write("</head>\n")
f.write("<body>\n")
- f.write("<p>Counts of success/failure per commit\n")
- f.write("Failure count is a link to logs from failed run, if any.</p>\n")
+ f.write(EXPLANATION_HTML)
f.write("<ol>\n")
for commit in sorted(d.keys()):
(succ, fail) = d[commit]
@@ -203,6 +210,8 @@ def count(counts, stats):
f.write(f"{fail}")
f.write(f"</li>\n")
f.write("</oi>\n")
+ timestamp = time.strftime("%Y-%m-%d %H:%M:%S")
+ f.write(f"<p>Last updated {timestamp}</p>\n")
f.write("</body>\n")
f.write("</html>\n")