This repository has been archived on 2025-10-02. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
inter-font/misc/download-count.py
2017-09-10 12:44:24 -07:00

16 lines
403 B
Python
Executable file

#!/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)