2017-09-10 22:44:24 +03:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# encoding: utf8
|
|
|
|
from __future__ import print_function
|
|
|
|
import os, sys, json, urllib2
|
|
|
|
|
2017-09-23 20:12:51 +03:00
|
|
|
f = urllib2.urlopen('https://api.github.com/repos/rsms/inter/releases')
|
2017-09-10 22:44:24 +03:00
|
|
|
releases = json.load(f)
|
|
|
|
|
|
|
|
countTotal = 0
|
|
|
|
|
|
|
|
for release in releases:
|
2017-09-23 20:12:51 +03:00
|
|
|
if len(release['assets']) > 0:
|
|
|
|
count = release['assets'][0]['download_count']
|
|
|
|
countTotal += count
|
|
|
|
print('%s: %d' % (release['tag_name'], count))
|
|
|
|
else:
|
|
|
|
print('%s: (missing)' % release['tag_name'])
|
2017-09-10 22:44:24 +03:00
|
|
|
|
|
|
|
print('Total: %d' % countTotal)
|