Rewrite contributor lister in Python.

This commit is contained in:
Stefan van der Walt
2013-10-16 17:53:04 +02:00
parent f7289731a1
commit 3e717559e5
3 changed files with 24 additions and 3 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env python
import subprocess
import sys
import string
if len(sys.argv) != 2:
print "Usage: ./contributors.py tag-of-previous-release"
sys.exit(-1)
tag = sys.argv[1]
cmd = "git log %s..HEAD --format=%%aN"
authors = subprocess.check_output((cmd % tag).split()).split('\n')
authors = [a.strip() for a in authors if a.strip()]
def key(author):
author = [v for v in author.split() if v[0] in string.letters]
return author[-1]
authors = sorted(set(authors), key=key)
for a in authors:
print '-', a
-2
View File
@@ -1,2 +0,0 @@
git log $1..HEAD --format='- %aN' | sed 's/@/\-at\-/' | sed 's/<>//' | sort -u