diff scripts/contributors.py @ 4827:f1c7f99e6fc0

contributors.py: Add aliases and process them
author anatoly techtonik <techtonik@gmail.com>
date Sun, 25 Aug 2013 17:45:43 +0300
parents 7c765b6fc44b
children 64daaa4bf816
line wrap: on
line diff
--- a/scripts/contributors.py	Sun Aug 25 17:21:24 2013 +0300
+++ b/scripts/contributors.py	Sun Aug 25 17:45:43 2013 +0300
@@ -15,6 +15,22 @@
 verbose = True
 # /--
 
+# --- project specific configuration
+ALIASES = {
+  'Richard Jones <richard@mechanicalcat.net>':
+      ['richard',
+       'Richard Jones <richard@users.sourceforge.net>'],
+  'Bernhard Reiter <bernhard@intevation.de>':
+      ['Bernhard Reiter <ber@users.sourceforge.net>',
+       'Bernhard Reiter <Bernhard.Reiter@intevation.de>'],
+  'Ralf Schlatterbeck <rsc@runtux.com>':
+      ['Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>'],
+  'Stefan Seefeld <stefan@seefeld.name>':
+      ['Stefan Seefeld <stefan@users.sourceforge.net>'],
+  'John P. Rouillard <rouilj@cs.umb.edu>':
+      ['rouilj'],
+}
+# /-- 
 
 
 def compress(years):
@@ -76,7 +92,12 @@
     print("Sorting...")
   years = {}  # year -> set(author1, author2, ...)
   names = {}  # author -> set(years)
-  for year,author in authorship:
+  for year, author in authorship:
+    # process aliases
+    for name, aliases in ALIASES.items():
+      if author in aliases:
+        author = name
+        break
     # years
     if not year in years:
       years[year] = set()

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