Skip to content

Instantly share code, notes, and snippets.

@sciurus
Last active March 7, 2019 16:34
Show Gist options
  • Save sciurus/14348158eaa570fe656052b5d59cca82 to your computer and use it in GitHub Desktop.
Save sciurus/14348158eaa570fe656052b5d59cca82 to your computer and use it in GitHub Desktop.
download.py
import os
import re
# ZA̡͊͠͝LGΌ ISͮ̂҉̯͈͕̹̘̱ TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡ H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ
pattern = re.compile(r'<span class="CommitLog-author" title="(\w*@\w*.\w*)')
all_committers = set()
for f in os.listdir("log"):
if "external" in f or "third_party" in f or "deps" in f:
continue
log = open(f"log/{f}", "r").read()
commits = pattern.findall(log)
repo_committers = set(commits)
all_committers = set.union(all_committers, repo_committers)
print(f"{f}: {repo_committers}")
print(len(all_committers))
import json
import requests
# cleaned up https://chromium.googlesource.com/?format=JSON
repos = json.load(open("repolist.json", "r"))
for name, details in repos.items():
filename = name.replace("/", "_")
url = details["clone_url"] + "/+log"
log = requests.get(url).text
with open(f"log/{filename}.html", "w") as f:
f.write(log)
print(name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment