tools/litex_contributors: Rename authors to contributors.
This commit is contained in:
parent
0144612751
commit
0bd19fd026
|
@ -43,7 +43,7 @@ def list_contributors(path):
|
||||||
os.system(f"git log --follow --pretty=format:\"%an,%ae,%aI\" {path} | sort | uniq > contribs.csv")
|
os.system(f"git log --follow --pretty=format:\"%an,%ae,%aI\" {path} | sort | uniq > contribs.csv")
|
||||||
|
|
||||||
# Read .csv and process it.
|
# Read .csv and process it.
|
||||||
authors = {}
|
contributors = {}
|
||||||
with open("contribs.csv", newline='') as csvfile:
|
with open("contribs.csv", newline='') as csvfile:
|
||||||
reader = csv.reader(csvfile, delimiter=",")
|
reader = csv.reader(csvfile, delimiter=",")
|
||||||
for line in reader:
|
for line in reader:
|
||||||
|
@ -55,13 +55,13 @@ def list_contributors(path):
|
||||||
if companies_email.lower() in email:
|
if companies_email.lower() in email:
|
||||||
name = companies_name
|
name = companies_name
|
||||||
email = companies_email
|
email = companies_email
|
||||||
if name in authors.keys():
|
if name in contributors.keys():
|
||||||
authors[name].add_year(int(year))
|
contributors[name].add_year(int(year))
|
||||||
else:
|
else:
|
||||||
authors[name] = Author(email, int(year))
|
contributors[name] = Author(email, int(year))
|
||||||
|
|
||||||
# Export Contributors.
|
# Export Contributors.
|
||||||
for name, info in authors.items():
|
for name, info in contributors.items():
|
||||||
r = "Copyright (c) "
|
r = "Copyright (c) "
|
||||||
if len(info.years) > 1:
|
if len(info.years) > 1:
|
||||||
years = f"{info.years[0]}-{info.years[-1]}"
|
years = f"{info.years[0]}-{info.years[-1]}"
|
||||||
|
|
Loading…
Reference in New Issue