Skip to content

Commit

Permalink
bumped to version 0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Nov 6, 2017
1 parent 323eb2d commit d57676b
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions scripts/collect_stats.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import re
from pprint import pprint

import requests

Expand All @@ -16,15 +17,33 @@ def downloads():
print(" - {}: {}".format(platform, count))

downloads += asset["download_count"]

print("Total: ", downloads)


def stars():
r = requests.get("https://api.github.com/repos/ActivityWatch/activitywatch")
d = r.json()

print("Stars: ", d["stargazers_count"])

stars()
downloads()

def clones():
# TODO: Needs push access to the repository
r = requests.get("https://api.github.com/repos/ActivityWatch/activitywatch/traffic/clones?per=day")
d = r.json()
pprint(d)


def twitter():
# TODO: Needs API key
r = requests.get("https://api.twitter.com/1.1/users/show.json?screen_name=ActivityWatchIt")
d = r.json()
pprint(d)
followers = d["followers_count"]
print("Followers: ", followers)


if __name__ == "__main__":
stars()
downloads()
clones()
#twitter()

0 comments on commit d57676b

Please sign in to comment.