summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/reproducible_html_notes.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py
index ce14c260..64a9a00e 100755
--- a/bin/reproducible_html_notes.py
+++ b/bin/reproducible_html_notes.py
@@ -306,6 +306,28 @@ def index_issues(issues):
write_html_page(title=title, body=html, destfile=destfile)
log.info('Issues index now available at ' + desturl)
+def index_notes(notes):
+ 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>'
+ if pkg_has_buildinfo(pkg):
+ html += '<span class="beta">&beta;</span>'
+ html += '\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>'
+ title = 'Overview of packages with notes'
+ destfile = BASE + '/index_notes.html'
+ desturl = REPRODUCIBLE_URL + '/index_notes.html'
+ write_html_page(title=title, body=html, destfile=destfile,
+ style_note=True, buildinfo_note=True)
+ log.info('Notes index now available at ' + desturl)
+
+
if __name__ == '__main__':
issues_count = {}
notes = load_notes()
@@ -313,4 +335,5 @@ if __name__ == '__main__':
iterate_over_notes(notes)
iterate_over_issues(issues)
index_issues(issues)
+ index_notes(notes)
purge_old_notes(notes)