diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-04-13 03:42:56 +0200 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2015-04-16 16:38:49 +0200 |
commit | bb66d9459d8e74f5fb0f0526af644a73f99b6d0d (patch) | |
tree | 99d7b98010651ad1097d40deaf02f8a16d0164b9 | |
parent | 3876b4b00969a0a5b62aaecb033ba40d8ec968ea (diff) | |
download | jenkins.debian.net-bb66d9459d8e74f5fb0f0526af644a73f99b6d0d.tar.xz |
reproducible: html_indexes: also support a header_query keyword, to format the header line
-rwxr-xr-x | bin/reproducible_html_indexes.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/reproducible_html_indexes.py b/bin/reproducible_html_indexes.py index 700d6f05..56369062 100755 --- a/bin/reproducible_html_indexes.py +++ b/bin/reproducible_html_indexes.py @@ -20,6 +20,8 @@ Reference doc for the folowing lists: element is a page. Every page has: + `title`: The page title + `header`: (optional) sane html to be printed on top of the page + + `header_query`: (optional): the output of this query is put inside "tot" of + the string above + `body`: a list of dicts containing every section that made up the page. Every section has: - `icon_status`: the name of a icon (see join_status_icon()) @@ -341,7 +343,11 @@ def build_page(page, suite=None, arch=None): html = '' footnote = False if pages[page].get('header'): - html += pages[page].get('header') + if pages[page].get('header_query'): + html += pages[page]['header'].format( + tot=query_db(pages[page]['header_query'])[0][0]) + else: + html += pages[page].get('header') for section in page_sections: if gpage: if section.get('nosuite') and section['nosuite']: # only defaults |