From 0b2f52af28f3c0a3b925ab904cbe1715fb7b68ac Mon Sep 17 00:00:00 2001 From: Blaise Thompson Date: Thu, 4 Jul 2019 21:35:24 -0500 Subject: add last updated line at bottom of html --- build.sh | 2 ++ build_html.py | 5 +++-- publicize.sh | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100755 build.sh create mode 100755 publicize.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..92e4338 --- /dev/null +++ b/build.sh @@ -0,0 +1,2 @@ +python3 /home/blaise/website/agenda/build_html.py +/home/blaise/website/agenda/publicize.sh diff --git a/build_html.py b/build_html.py index 7622c9a..211eb94 100644 --- a/build_html.py +++ b/build_html.py @@ -95,9 +95,9 @@ with open(__here__ / "public" / "index.html", "w") as html: if event.end: if event.timestamp <= day and event.end >= day: total = event.end - event.timestamp - elapsed = day - event.end + elapsed = total - (event.end - day) html.write( - f"(day {elapsed.days+3}/{total.days+1}) {event.description}
" + f"(day {elapsed.days+1}/{total.days+1}) {event.description}
" ) else: if event.timestamp == day: @@ -108,5 +108,6 @@ with open(__here__ / "public" / "index.html", "w") as html: break # footer html.write("
") + html.write(f"last updated {today.isoformat()}") html.write("\n") html.write("\n") diff --git a/publicize.sh b/publicize.sh new file mode 100755 index 0000000..7bbd1e8 --- /dev/null +++ b/publicize.sh @@ -0,0 +1 @@ +scp -r /home/blaise/website/agenda/public/* root@blaise.zone:/var/www/agenda.blaise.zone/html/ -- cgit v1.2.3