diff options
author | Rasmus Andersson <rasmus@notion.se> | 2017-09-10 22:44:24 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@notion.se> | 2017-09-10 22:44:24 +0300 |
commit | 5e639ba7f1f78cad9097a9d2cbc89f0e7501bb0e (patch) | |
tree | 3b9e3d15f350050df2d13c3dc7eee392e95b94e2 /misc | |
parent | 019fbee21f900d7d238516187b0f78c27d2821b4 (diff) | |
download | inter-5e639ba7f1f78cad9097a9d2cbc89f0e7501bb0e.tar.xz |
Adds script for retrieveing download counts from github
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/download-count.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/misc/download-count.py b/misc/download-count.py new file mode 100755 index 000000000..0908b334b --- /dev/null +++ b/misc/download-count.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +# encoding: utf8 +from __future__ import print_function +import os, sys, json, urllib2 + +f = urllib2.urlopen('https://api.github.com/repos/rsms/interface/releases') +releases = json.load(f) + +countTotal = 0 + +for release in releases: + count = release['assets'][0]['download_count'] + countTotal += count + print('%s: %d' % (release['tag_name'], count)) + +print('Total: %d' % countTotal) |