diff options
-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/ |