From feeb2bfe311b59b4d4a6c9e09d84395b1ec1d58e Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 1 Sep 2021 11:09:26 +0200 Subject: [PATCH] tools/litex_contributors: Add special cases for companies to replace individuals with company name/email. Avoid doing it manually. --- litex/tools/litex_contributors.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/litex/tools/litex_contributors.py b/litex/tools/litex_contributors.py index 2c2f51cf7..fc6afb4af 100755 --- a/litex/tools/litex_contributors.py +++ b/litex/tools/litex_contributors.py @@ -30,6 +30,11 @@ class Author: # Use Git Log + Processing to create the list of Contibutors --------------------------------------- +companies = { + "Antmicro" : "Antmicro.com", + "Google" : "Google.com", +} + def list_contributors(path): # Create .csv with git log. @@ -43,6 +48,11 @@ def list_contributors(path): name = line[0] email = line[1] year = line[2][:4] + # For companies, replace individuals with company name/email. + for companies_name, companies_email in companies.items(): + if companies_email.lower() in email: + name = companies_name + email = companies_email if name in authors.keys(): authors[name].add_year(int(year)) else: