Rewrite contributor lister in Python.

This commit is contained in:
Stefan van der Walt
2013-10-16 17:52:37 +02:00
parent f7289731a1
commit 3e717559e5
3 changed files with 24 additions and 3 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ How to make a new release of ``skimage``
- Update release notes.
- To show a list contributors, run ``doc/release/contributors.sh <commit>``,
- To show a list contributors, run ``doc/release/contributors.py <commit>``,
where ``<commit>`` is the first commit since the previous release.
- Update the version number in ``setup.py`` and ``bento.info`` and commit
+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