diff options
author | mjfernez <mjf@mjfer.net> | 2023-11-22 14:43:41 -0500 |
---|---|---|
committer | mjfernez <mjf@mjfer.net> | 2023-11-22 14:43:41 -0500 |
commit | f084b6b60b0b19f3a5586ac7508fc8be1ce04624 (patch) | |
tree | b3b6b229418d26d1c67dda0a3f4d02db55d0dfe1 /update_latest.py | |
parent | 1c5025d54c3a8244fcbe818f96dea49e51054ba6 (diff) | |
download | site-files-f084b6b60b0b19f3a5586ac7508fc8be1ce04624.tar.gz |
Moved latest updates to files. Fixed up RESUME.
Also fixed an issue with the latest page where it tried to redirect to a
subdirectory instead of going from root
Diffstat (limited to 'update_latest.py')
-rw-r--r-- | update_latest.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/update_latest.py b/update_latest.py index 160dc7c..94bf5a2 100644 --- a/update_latest.py +++ b/update_latest.py @@ -1,6 +1,7 @@ import os import subprocess -from time import mktime, ctime +from time import mktime +from datetime import date from email.utils import parsedate def file_last_modified(path): @@ -35,7 +36,8 @@ for f, t in sorted(updates.items(), key=lambda x: x[1], reverse=True)[:10]: #print(f, ctime(t), sep="\t") - print(f"\t<li><a href={f}>{f.split()[-1]}</a> - Updated: {ctime(t)}</li>") + if f != "latest.html": + print(f"\t<li><a href=/{f}>{f.split()[-1]}</a> - Updated: {date.fromtimestamp(t)}</li>") print("</ul>") print("</body>") |