summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-01-14 19:59:46 +0100
committerHolger Levsen <holger@layer-acht.org>2015-01-15 00:14:31 +0100
commit81f4bd9db94960e6037d917fe9d6216539d015a3 (patch)
treee6e4539e9f407b74a47f155fac2d3ae94372ca1c
parentfa4ec80cbd367f3a9923dbd1a8b3387f21deb153 (diff)
downloadjenkins.debian.net-81f4bd9db94960e6037d917fe9d6216539d015a3.tar.xz
reproducible: html_notes: also build the index_notes.html page
-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)