diff --git a/bin/.ignore-emails b/bin/.ignore-emails new file mode 100644 index 000000000..32a9f47b4 --- /dev/null +++ b/bin/.ignore-emails @@ -0,0 +1,3 @@ +# Email addresses to ignore in the git log when making the authors.md file + + diff --git a/bin/update-authors.py b/bin/update-authors.py index 0bf75c20e..effedb091 100755 --- a/bin/update-authors.py +++ b/bin/update-authors.py @@ -7,17 +7,15 @@ import re import subprocess 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() - emails = set(re.findall(r"<(.*?)>", authors)) - emails.update(IGNORE) - return emails + return set(re.findall(r"<(.*?)>", authors)) def add_email(name, email): """ @@ -32,7 +30,9 @@ def main(): out = subprocess.check_output(["git", "log", '--reverse', '--format=%an|%ae', "master"]) out = out.decode("utf-8") - previous = load() + ignored = load(IGNORE) + previous = load(AUTHORS) + previous.update(ignored) for line in out.split("\n"): line = line.strip() if line == "": diff --git a/docs/content/authors.md b/docs/content/authors.md index ad17ddd0b..0f7e09f25 100644 --- a/docs/content/authors.md +++ b/docs/content/authors.md @@ -12,6 +12,10 @@ Authors Contributors ------------ + + * Alex Couper * Leonid Shalupov * Shimon Doodkin @@ -192,7 +196,7 @@ Contributors * Sheldon Rupp * albertony <12441419+albertony@users.noreply.github.com> * cron410 - * Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com> + * Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com> * Felix Brucker * Santiago Rodríguez * Craig Miskell