diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2022-01-29 21:11:46 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2022-02-03 16:28:12 +0300 |
commit | 2677eb4380ec544335aec40b71d12d723e76195d (patch) | |
tree | 22ab9485b8d273e90bf6d3c1fc2ec361d6dc97a4 /calm/pkg2html.py | |
parent | 88b57728790ae1556d545697c15f315dfa182e75 (diff) |
Add 'unmaintained packages' report
Diffstat (limited to 'calm/pkg2html.py')
-rwxr-xr-x | calm/pkg2html.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/calm/pkg2html.py b/calm/pkg2html.py index b43ed71..b2080dc 100755 --- a/calm/pkg2html.py +++ b/calm/pkg2html.py @@ -120,6 +120,13 @@ def ensure_dir_exists(args, path): # +# format a unix epoch time (UTC) +# +def tsformat(ts): + return time.strftime('%Y-%m-%d %H:%M', time.gmtime(ts)) + + +# # # @@ -280,7 +287,7 @@ def update_package_listings(args, packages): name = v + ' (source)' target = "%s-%s-src" % (p.orig_name, v) test = 'test' if 'test' in p.version_hints[v] else 'stable' - ts = time.strftime('%Y-%m-%d %H:%M', time.gmtime(p.tar(v).mtime)) + ts = tsformat(p.tar(v).mtime) print('<tr><td>%s</td><td class="right">%d KiB</td><td>%s</td><td>[<a href="../%s/%s/%s">list of files</a>]</td><td>%s</td></tr>' % (name, size, ts, arch, pn, target, test), file=f) for version in sorted(packages[arch][p].versions(), key=lambda v: SetupVersion(v)): |