Last active
November 5, 2017 18:38
-
-
Save mossheim/f78f9ec951a2d23fd44773bd749d2ad7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SuperCollider-3.8.0-OSX.zip 18565 | |
SuperCollider-3.8.0-Source-linux.tar.bz2 2377 | |
SuperCollider-3.8.0-Source.tar.bz2 75 | |
SuperCollider-3.8.0_Windows_32bits_MW_SuperNova_0947edd.exe 5328 | |
SuperCollider-3.8.0_Windows_32bits_VS_Sonic_Pi_0947edd.exe 969 | |
SuperCollider-3.8.0_Windows_64bit_VS_0947edd.exe 12987 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SuperCollider-3.9.0-beta1-macOS.zip 56 | |
SuperCollider-3.9.0-beta1-Source-linux.tar.bz2 16 | |
SuperCollider-3.9.0-beta1-Source.tar.bz2 2 | |
SuperCollider-3.9.0-beta1-Windows-x64-VS.exe 26 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Output supercollider download stats | |
# Brian Heim 2017-11-04 | |
import sys | |
import json | |
def pull_stats(asset): | |
url = asset['browser_download_url'] | |
count = int(asset['download_count']) | |
url = url.split('/')[-1] | |
return (url, count) | |
if __name__ == "__main__": | |
stats_file = sys.argv[1] | |
with open(stats_file) as f: | |
stats = json.load(f) | |
if 'assets' not in stats: | |
print("Error: check the version string, no download stats found") | |
sys.exit(1) | |
assets = stats['assets'] | |
counts = [pull_stats(asset) for asset in assets] | |
for url, count in counts: | |
print('{} {}'.format(url, count)) | |
sys.exit(0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gets download statistics for SuperCollider release | |
if [[ -z "$1" ]]; then | |
echo "Usage: get_sc_stats.sh <version>" | |
exit 1 | |
fi | |
TMP=get_sc_stats.tmp | |
URL=https://api.github.com/repos/supercollider/supercollider/releases/tags/Version-$1 | |
curl $URL >$TMP 2>/dev/null | |
python3 get_sc_stats.py "$TMP" | |
if [[ $? != 0 ]]; then | |
echo "JSON is stored in $TMP" | |
exit 1 | |
fi | |
rm $TMP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment