From 5100ecc634c957966a1ad742375f485caaa57f56 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Thu, 9 Aug 2018 09:35:57 -0700 Subject: [PATCH] Sort cited-to results --- src/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build.py b/src/build.py index f31ce1d..ff22f48 100644 --- a/src/build.py +++ b/src/build.py @@ -179,7 +179,7 @@ def build_statistics_page(articles, config): cited_count = defaultdict(list) for title, count in cited_tally: cited_count[count].append(title) content += "
\n".join(map( - lambda kv: "{0} – {1}".format(kv[0], "; ".join(kv[1])), + lambda kv: "{0} – {1}".format(kv[0], "; ".join(sorted(kv[1]))), sorted(cited_count.items(), reverse=True)[:3])) content += "

\n" content += "\n"