diff options
author | Max Rees <maxcrees@me.com> | 2020-05-15 03:27:41 -0500 |
---|---|---|
committer | Max Rees <maxcrees@me.com> | 2020-05-15 03:27:41 -0500 |
commit | 5f8cd6d6234eaeeb4bbd06716d6411825f46f155 (patch) | |
tree | 8eb61a6ac831a5d72f65acc3ead546f3cf1bfedc /output.py | |
parent | 9793b1e6428bdea2663efd07aee83b55aae421bd (diff) | |
download | arch-tester-overhaul.tar.gz arch-tester-overhaul.tar.bz2 arch-tester-overhaul.tar.xz arch-tester-overhaul.zip |
output: fill in details for HTMLoverhaul
Diffstat (limited to 'output.py')
-rw-r--r-- | output.py | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -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"""<!DOCTYPE html> <html> <head> - <title>APKINDEX analysis - {date}</title> + <title>APKINDEX analysis - %(date)s</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <style type="text/css"> table { @@ -66,11 +67,11 @@ _HEADER = r"""<!DOCTYPE html> </style> </head> <body> - <h1>APKINDEX analysis - {date}</h1> + <h1>APKINDEX analysis - %(date)s</h1> <p> - Base URL: <a href="{url}">{url}</a><br> - Repositories: {repos}<br> - Architectures: {arches}<br> + Base URL: <a href="%(url)s">%(url)s</a><br> + Repositories: %(repos)s<br> + Architectures: %(arches)s<br> </p> """ _FOOTER = r""" </body> @@ -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: |