Browse Source

Add script to automatically update AUTHORS file

doc-issue-template
MrS0m30n3 7 years ago
parent
commit
e078d6af29
2 changed files with 27 additions and 2 deletions
  1. 2
      TODO
  2. 27
      devscripts/update-authors.sh

2
TODO

@ -1,8 +1,6 @@
Before new_layout branch merge
==============================
* README.md update (pull-request #145)
* Script to automatically update file contents:
contributors : AUTHORS
After new_layout merge

27
devscripts/update-authors.sh

@ -0,0 +1,27 @@
#!/bin/bash
# Author: Sotiris Papadopoulos <ytubedlg@gmail.com>
# Last-Revision: 2017-04-17
# Script to update the AUTHORS file
#
# Usage: ./update-authors.sh
cd ..
git log --reverse --format="%aN <%aE>" | python -c "
import sys
authors = set()
sys.stdout.write('# Authors ordered by first contribution.\n\n')
for line in sys.stdin:
username, _ = line.split('<')
if username not in authors:
authors.add(username)
sys.stdout.write(line)
sys.stdout.write('\n# Generated by update-authors.sh script\n')
" > AUTHORS
Loading…
Cancel
Save