[mhonarc] show top 10 subscriber lists in bold



commit 2338cda4e280f50aa7055b1f5f2a5add28b2e5d3
Author: Olav Vitters <olav vitters nl>
Date:   Wed Feb 13 14:19:39 2013 +0100

    show top 10 subscriber lists in bold

 update-master |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/update-master b/update-master
index 1cf8216..f0dd48d 100755
--- a/update-master
+++ b/update-master
@@ -126,8 +126,15 @@ print >>INDEX, """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.
     <ul style="-moz-column-width: 30ex; -webkit-column-width: 30ex; column-width: 30ex">
 """
 
+top_mlists = set(sorted(mlists, cmp=lambda m: len(m.members))[:10])
+
 for list in mlists:
-    print >>INDEX, '<li><a href="%s/">%s</a></li>' % (list.internal_name(), list.internal_name())
+    if list in top_mlists:
+        fmt = '<li><b><a href="%s/">%s</a></b></li>'
+    else:
+        fmt = '<li><a href="%s/">%s</a></li>'
+
+    print >>INDEX, fmt % (list.internal_name(), list.internal_name())
 print >>INDEX, "</ul>"
 
 if len(obsolete_mlists):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]