mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
tools/litex_contributors: Add special cases for companies to replace individuals with company name/email.
Avoid doing it manually.
This commit is contained in:
parent
1d27e25cbb
commit
feeb2bfe31
1 changed files with 10 additions and 0 deletions
|
@ -30,6 +30,11 @@ class Author:
|
||||||
|
|
||||||
# Use Git Log + Processing to create the list of Contibutors ---------------------------------------
|
# Use Git Log + Processing to create the list of Contibutors ---------------------------------------
|
||||||
|
|
||||||
|
companies = {
|
||||||
|
"Antmicro" : "Antmicro.com",
|
||||||
|
"Google" : "Google.com",
|
||||||
|
}
|
||||||
|
|
||||||
def list_contributors(path):
|
def list_contributors(path):
|
||||||
|
|
||||||
# Create .csv with git log.
|
# Create .csv with git log.
|
||||||
|
@ -43,6 +48,11 @@ def list_contributors(path):
|
||||||
name = line[0]
|
name = line[0]
|
||||||
email = line[1]
|
email = line[1]
|
||||||
year = line[2][:4]
|
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():
|
if name in authors.keys():
|
||||||
authors[name].add_year(int(year))
|
authors[name].add_year(int(year))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue