diff scripts/contributors.py @ 4825:b3bf0aa48368

contributors.py: Sort contributors by last contributor's year (newest first)
author anatoly techtonik <techtonik@gmail.com>
date Sun, 25 Aug 2013 17:06:18 +0300
parents b83576aa3f74
children 7c765b6fc44b
line wrap: on
line diff
--- a/scripts/contributors.py	Sun Aug 25 16:06:29 2013 +0300
+++ b/scripts/contributors.py	Sun Aug 25 17:06:18 2013 +0300
@@ -101,11 +101,16 @@
     if verbose:
       print("Years for each contributor...")
     print('')
-    for author in sorted(names):
+    
+    # sort authors by last contribution date (newest first)
+    def last_year(name):
+        return sorted(list(names[name]))[-1]
+    
+    for author in sorted(list(names), key=last_year, reverse=True):
       years = list(names[author])
       yearstr = compress(years)
 
-      if 1: #DEBUG
+      if 0: #DEBUG
         print(years, yearstr, author)
       else:
         print(yearstr, author)

Roundup Issue Tracker: http://roundup-tracker.org/