summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_html_notes.py
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-01-16 00:30:51 +0100
committerHolger Levsen <holger@layer-acht.org>2015-01-16 11:50:01 +0100
commit645cf24505f0797e30e995e4506fc576630f09c1 (patch)
tree818cc18125f33c6822d4e699c67f4f5070478a9b /bin/reproducible_html_notes.py
parenta40abf7f5940e7c0372c757a0f521937112039de (diff)
downloadjenkins.debian.net-645cf24505f0797e30e995e4506fc576630f09c1.tar.xz
reproducible: _html_notes: add the bug sign in the notes_index page
Diffstat (limited to 'bin/reproducible_html_notes.py')
-rwxr-xr-xbin/reproducible_html_notes.py17
1 files changed, 15 insertions, 2 deletions
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 += '<span class="'
+ if bugs[package][bug]['done']:
+ html += 'bug-done">#</span>'
+ elif bugs[package][bug]['patch']:
+ html += 'bug-patch">+</span>'
+ print(package + ' ' + html)
+ return html
+
def index_notes(notes):
+ bugs = get_bugs()
log.debug('Building the index_notes page...')
html = '\n<p>There are ' + str(len(notes)) + ' packages with notes.<p>\n'
html += '<p>\n' + tab + '<code>\n'
html = (tab*2).join(html.splitlines(True))
for pkg in sorted(notes):
url = RB_PKG_URI + '/' + pkg + '.html'
- html += tab*4 + '<a href="' + url + '" class="noted">' + pkg + '</a>\n'
+ html += tab*4 + '<a href="' + url + '" class="noted">' + pkg + '</a>'
+ html += get_trailing_icon(pkg, bugs) + '\n'
html += tab*3 + '</code>\n'
html += tab*2 + '</p>\n'
html += tab*2 + '<p>Notes are stored in <a href="https://anonscm.debian.org/cgit/reproducible/notes.git">notes.git</a>.</p>'