From 9fcd21f8b5947cb4a6a988715a90a14680466785 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Sat, 11 Jun 2016 16:09:36 +0200 Subject: reproducible debian: add popcon scores to mouseover text, and underline 1/4 of the most popular ones Signed-off-by: Holger Levsen --- bin/reproducible_html_notes.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py index 131ca14e..e26b0713 100755 --- a/bin/reproducible_html_notes.py +++ b/bin/reproducible_html_notes.py @@ -410,7 +410,14 @@ def index_issues(issues, scorefuncs): for scorefunc in scorefuncs.values(): html += tab*4 + '' + str(scorefunc(issues_list)) + '\n' html += tab*4 + '\n' - html += tab*5 + ', '.join(issues_list) + '\n' + issues_with_popcon = sorted(popcon.package(*issues_list).items(), key=lambda p: p[0]) + issues_by_popcon = sorted(issues_with_popcon, key=lambda p: p[1], reverse=True) + popular_packages = set([p[0] for p in issues_by_popcon[:int(len(issues_by_popcon)/4)]]) + issue_strings = [ + '%s' % ( + 'class="package-popular" ' if p[0] in popular_packages else '', p[1], p[0] + ) for p in issues_with_popcon] + html += tab*5 + ', '.join(issue_strings) + '\n' html += tab*4 + '\n' html += tab*3 + '\n' html += tab*2 + '\n' -- cgit v1.2.3-70-g09d2