From 81f4bd9db94960e6037d917fe9d6216539d015a3 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Wed, 14 Jan 2015 19:59:46 +0100 Subject: reproducible: html_notes: also build the index_notes.html page --- bin/reproducible_html_notes.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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

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 + '' + if pkg_has_buildinfo(pkg): + html += 'β' + html += '\n' + html += tab*3 + '\n' + html += tab*2 + '

\n' + html += tab*2 + '

Notes are stored in notes.git.

' + 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) -- cgit v1.2.3-70-g09d2