summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@noraisin.net>2009-02-19 20:41:31 +0000
committerJan Schmidt <thaytan@noraisin.net>2009-02-19 20:41:31 +0000
commit69c6f5e2f87b69670ba4afa9ecb859246705a593 (patch)
tree1b621bcc49d2718d46df6a166f657c9f69b05757 /bin
parentbe2a8b2a8e80a5530a0ccba0c95e018b63eeb350 (diff)
Update contributors script to handle new Changelog format
Diffstat (limited to 'bin')
-rwxr-xr-xbin/update-contributors11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/update-contributors b/bin/update-contributors
index e8067902..9b54f143 100755
--- a/bin/update-contributors
+++ b/bin/update-contributors
@@ -32,16 +32,19 @@ def main():
if relmatcher.match(lines[0]):
del lines[0]
- datedmatcher = re.compile('^\d*-\d*-\d*\s*(.*)\s*<.*>$')
- bymatcher = re.compile(' by: ([^<]*)\s*.*$')
+ datedmatcher = re.compile('^\d*-\d*-\d*\s(?:[0-9:]+ [+-]\d{4}\s)\s?(.*)\s*<.*>$')
+ bymatcher = re.compile(' by: ([^<]+)\s*.*$')
+ byaddyonlymatcher = re.compile(' by:[ ]*<([^>]*)')
for line in lines:
if relmatcher.match(line):
break
- for matcher in [datedmatcher, bymatcher]:
+ for matcher in [datedmatcher, bymatcher, byaddyonlymatcher]:
match = matcher.search(line)
if match:
name = match.expand("\\1").rstrip()
- if not name in names:
+ if name == "":
+ print "Warning: parsed null name from '%s'" % (line)
+ if not name in names and name != "":
names.append(name)
names.sort()