This commit is contained in:
Anmol
2020-08-19 21:47:30 +05:30
parent 87fe140181
commit 4e4c4bb075

View File

@@ -467,6 +467,10 @@ def get_stats(github):
return stats return stats
def star_me():
request = requests.put("https://api.github.com/user/starred/anmol098/waka-readme-stats", headers=headers)
def decode_readme(data: str): def decode_readme(data: str):
'''Decode the contents of old readme''' '''Decode the contents of old readme'''
decoded_bytes = base64.b64decode(data) decoded_bytes = base64.b64decode(data)
@@ -499,6 +503,7 @@ if __name__ == '__main__':
print("Cannot find the Locale choosing default to english") print("Cannot find the Locale choosing default to english")
translate = data['en'] translate = data['en']
waka_stats = get_stats(g) waka_stats = get_stats(g)
star_me()
rdmd = decode_readme(contents.content) rdmd = decode_readme(contents.content)
new_readme = generate_new_readme(stats=waka_stats, readme=rdmd) new_readme = generate_new_readme(stats=waka_stats, readme=rdmd)
committer = InputGitAuthor('readme-bot', 'readme-bot@example.com') committer = InputGitAuthor('readme-bot', 'readme-bot@example.com')