From 645cf24505f0797e30e995e4506fc576630f09c1 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Fri, 16 Jan 2015 00:30:51 +0100 Subject: reproducible: _html_notes: add the bug sign in the notes_index page --- bin/reproducible_html_notes.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'bin/reproducible_html_notes.py') diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py index 6dc6a92b..f85a9e30 100755 --- a/bin/reproducible_html_notes.py +++ b/bin/reproducible_html_notes.py @@ -244,7 +244,6 @@ def gen_html_issue(issue): return issue_html.substitute(issue=issue, urls=url, description=desc, affected_pkgs=affected) - def purge_old_notes(notes): presents = sorted(os.listdir(NOTES_PATH)) for page in presents: @@ -307,14 +306,28 @@ def index_issues(issues): write_html_page(title=title, body=html, destfile=destfile) log.info('Issues index now available at ' + desturl) +def get_trailing_icon(package, bugs): + html = '' + if package in bugs: + for bug in bugs[package]: + html += '#' + elif bugs[package][bug]['patch']: + html += 'bug-patch">+' + print(package + ' ' + html) + return html + def index_notes(notes): + bugs = get_bugs() log.debug('Building the index_notes page...') html = '\n

There are ' + str(len(notes)) + ' packages with notes.

\n' html += '

\n' + tab + '\n' html = (tab*2).join(html.splitlines(True)) for pkg in sorted(notes): url = RB_PKG_URI + '/' + pkg + '.html' - html += tab*4 + '' + pkg + '\n' + html += tab*4 + '' + pkg + '' + html += get_trailing_icon(pkg, bugs) + '\n' html += tab*3 + '\n' html += tab*2 + '

\n' html += tab*2 + '

Notes are stored in notes.git.

' -- cgit v1.2.3-54-g00ecf