From 5f8cd6d6234eaeeb4bbd06716d6411825f46f155 Mon Sep 17 00:00:00 2001 From: Max Rees Date: Fri, 15 May 2020 03:27:41 -0500 Subject: output: fill in details for HTML --- output.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/output.py b/output.py index c8bb542..8d456dc 100644 --- a/output.py +++ b/output.py @@ -3,6 +3,7 @@ # Copyright © 2019-2020 Adélie Linux team. All rights reserved. # NCSA license. # +import datetime import functools import subprocess @@ -40,7 +41,7 @@ YES_MISSING = Yes("missing") _HEADER = r""" - APKINDEX analysis - {date} + APKINDEX analysis - %(date)s -

APKINDEX analysis - {date}

+

APKINDEX analysis - %(date)s

- Base URL: {url}
- Repositories: {repos}
- Architectures: {arches}
+ Base URL: %(url)s
+ Repositories: %(repos)s
+ Architectures: %(arches)s

""" _FOOTER = r""" @@ -106,7 +107,12 @@ def format_pretty(_, rows): proc.communicate() def format_html(opts, rows): - print(_HEADER) + print(_HEADER % { + "url": opts.url, + "repos": ", ".join(opts.repos), + "arches": ", ".join(opts.arches), + "date": datetime.datetime.now().strftime("%c"), + }) first = True for row in rows: -- cgit v1.2.3-70-g09d2