Make it possible to correct author names in src2asciidoc.

This commit is contained in:
Florian Bruhin 2015-03-18 20:24:47 +01:00
parent c83775cf29
commit 1a534454e2

View File

@ -324,8 +324,11 @@ def generate_settings(filename):
def _get_authors():
"""Get a list of authors based on git commit logs."""
corrections = {'binix': 'sbinix'}
commits = subprocess.check_output(['git', 'log', '--format=%aN'])
cnt = collections.Counter(commits.decode('utf-8').splitlines())
authors = [corrections.get(author, author)
for author in commits.decode('utf-8').splitlines()]
cnt = collections.Counter(authors)
return sorted(cnt, key=lambda k: (cnt[k], k), reverse=True)