docs: add bin/.ignored-emails for removing email addresses from authors.md

Remove an email as requested for Anagh Kumar Baranwal
This commit is contained in:
Nick Craig-Wood 2020-05-04 17:38:25 +01:00
parent a86196a156
commit dcf945ed58
3 changed files with 16 additions and 9 deletions

3
bin/.ignore-emails Normal file
View File

@ -0,0 +1,3 @@
# Email addresses to ignore in the git log when making the authors.md file
<nick@raig-wood.com>
<anaghk.dos@gmail.com>

View File

@ -7,17 +7,15 @@ import re
import subprocess import subprocess
AUTHORS = "docs/content/authors.md" AUTHORS = "docs/content/authors.md"
IGNORE = [ "nick@raig-wood.com" ] IGNORE = "bin/.ignore-emails"
def load(): def load(filename):
""" """
returns a set of emails already in authors.md returns a set of emails already in the file
""" """
with open(AUTHORS) as fd: with open(filename) as fd:
authors = fd.read() authors = fd.read()
emails = set(re.findall(r"<(.*?)>", authors)) return set(re.findall(r"<(.*?)>", authors))
emails.update(IGNORE)
return emails
def add_email(name, email): def add_email(name, email):
""" """
@ -32,7 +30,9 @@ def main():
out = subprocess.check_output(["git", "log", '--reverse', '--format=%an|%ae', "master"]) out = subprocess.check_output(["git", "log", '--reverse', '--format=%an|%ae', "master"])
out = out.decode("utf-8") out = out.decode("utf-8")
previous = load() ignored = load(IGNORE)
previous = load(AUTHORS)
previous.update(ignored)
for line in out.split("\n"): for line in out.split("\n"):
line = line.strip() line = line.strip()
if line == "": if line == "":

View File

@ -12,6 +12,10 @@ Authors
Contributors Contributors
------------ ------------
<!--- NB email addresses removed from here need to be addeed to
bin/.ignore-emails to make sure update-authors.py doesn't immediately
put them back in again. -->
* Alex Couper <amcouper@gmail.com> * Alex Couper <amcouper@gmail.com>
* Leonid Shalupov <leonid@shalupov.com> <shalupov@diverse.org.ru> * Leonid Shalupov <leonid@shalupov.com> <shalupov@diverse.org.ru>
* Shimon Doodkin <helpmepro1@gmail.com> * Shimon Doodkin <helpmepro1@gmail.com>
@ -192,7 +196,7 @@ Contributors
* Sheldon Rupp <me@shel.io> * Sheldon Rupp <me@shel.io>
* albertony <12441419+albertony@users.noreply.github.com> * albertony <12441419+albertony@users.noreply.github.com>
* cron410 <cron410@gmail.com> * cron410 <cron410@gmail.com>
* Anagh Kumar Baranwal <anaghk.dos@gmail.com> <6824881+darthShadow@users.noreply.github.com> * Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com>
* Felix Brucker <felix@felixbrucker.com> * Felix Brucker <felix@felixbrucker.com>
* Santiago Rodríguez <scollazo@users.noreply.github.com> * Santiago Rodríguez <scollazo@users.noreply.github.com>
* Craig Miskell <craig.miskell@fluxfederation.com> * Craig Miskell <craig.miskell@fluxfederation.com>