From 5e639ba7f1f78cad9097a9d2cbc89f0e7501bb0e Mon Sep 17 00:00:00 2001 From: Rasmus Andersson Date: Sun, 10 Sep 2017 12:44:24 -0700 Subject: Adds script for retrieveing download counts from github --- misc/download-count.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 misc/download-count.py 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) -- cgit v1.2.3