diff options
author | Blaise Thompson <blaise@untzag.com> | 2019-07-04 21:35:24 -0500 |
---|---|---|
committer | Blaise Thompson <blaise@untzag.com> | 2019-07-04 21:35:24 -0500 |
commit | 0b2f52af28f3c0a3b925ab904cbe1715fb7b68ac (patch) | |
tree | be550ebdd0ce3aaa2706f5ae3230e33a11fb6964 | |
parent | 26bbd1c75e83d0642f93c07cb8486525d40da0b1 (diff) |
add last updated line at bottom of html
-rwxr-xr-x | build.sh | 2 | ||||
-rw-r--r-- | build_html.py | 5 | ||||
-rwxr-xr-x | publicize.sh | 1 |
3 files changed, 6 insertions, 2 deletions
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}<br>" + f"(day {elapsed.days+1}/{total.days+1}) {event.description}<br>" ) else: if event.timestamp == day: @@ -108,5 +108,6 @@ with open(__here__ / "public" / "index.html", "w") as html: break # footer html.write("<hr>") + html.write(f"last updated {today.isoformat()}") html.write("</body>\n") html.write("</html>\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/ |