Fix download count script. Note that it only counts after the projects was renamed to "Inter"
This commit is contained in:
parent
1d2ddfc825
commit
d457ac8e05
1 changed files with 7 additions and 4 deletions
|
|
@ -3,14 +3,17 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import os, sys, json, urllib2
|
import os, sys, json, urllib2
|
||||||
|
|
||||||
f = urllib2.urlopen('https://api.github.com/repos/rsms/interface/releases')
|
f = urllib2.urlopen('https://api.github.com/repos/rsms/inter/releases')
|
||||||
releases = json.load(f)
|
releases = json.load(f)
|
||||||
|
|
||||||
countTotal = 0
|
countTotal = 0
|
||||||
|
|
||||||
for release in releases:
|
for release in releases:
|
||||||
count = release['assets'][0]['download_count']
|
if len(release['assets']) > 0:
|
||||||
countTotal += count
|
count = release['assets'][0]['download_count']
|
||||||
print('%s: %d' % (release['tag_name'], count))
|
countTotal += count
|
||||||
|
print('%s: %d' % (release['tag_name'], count))
|
||||||
|
else:
|
||||||
|
print('%s: (missing)' % release['tag_name'])
|
||||||
|
|
||||||
print('Total: %d' % countTotal)
|
print('Total: %d' % countTotal)
|
||||||
|
|
|
||||||
Reference in a new issue