AntennaPod/createDevelopersList.py

31 lines
1.1 KiB
Python
Raw Normal View History

2019-11-08 23:29:00 +01:00
#!/usr/bin/env python3
import requests
MAINTAINERS = ['mfietz', 'ByteHamster']
FORMER_MAINTAINERS = ['TomHennen']
2019-11-09 01:07:13 +01:00
csvFile = open("app/src/main/assets/developers.csv", "w")
contributorsFile = open("CONTRIBUTORS", "a")
2019-11-08 23:29:00 +01:00
page = 1
hasMore = True
while hasMore:
json = requests.get('https://api.github.com/repos/AntennaPod/AntennaPod/contributors'
+ '?q=contributions&order=desc&per_page=100&page=' + str(page)).json()
for contributor in json:
role = 'Contributor'
if contributor['login'] == 'danieloeh':
2019-11-09 01:24:09 +01:00
role = 'Original creator of AntennaPod (retired)'
2019-11-08 23:29:00 +01:00
elif contributor['login'] in MAINTAINERS:
role = 'Maintainer'
elif contributor['login'] in FORMER_MAINTAINERS:
role = 'Maintainer (retired)'
line = contributor['login'].replace(";", "") + ';' + str(contributor['id']) + ';' + role
csvFile.write(line + '\n')
print(line)
2019-11-09 01:07:13 +01:00
contributorsFile.write(contributor['login'] + '\n')
2019-11-08 23:29:00 +01:00
page = page + 1
hasMore = len(json) > 0
csvFile.close()
2019-11-09 01:07:13 +01:00
contributorsFile.close()
2019-11-08 23:29:00 +01:00