Finding the download count of GitHub releases
October 16, 2015 [Programming, Tech]You can use the GitHub API to find out how many times the files in your releases have been downloaded.
For example, to find out how many downloads there have been of my Rabbit Escape project you can do:
curl -s https://api.github.com/repos/andybalaam/rabbit-escape/releases | egrep '"name"|"download_count"'
Or you can look through the information manually by visiting a URL like https://api.github.com/repos/andybalaam/rabbit-escape/releases in your browser.
To get the total I came up with this beautiful incantation:
curl -s https://api.github.com/repos/andybalaam/rabbit-escape/releases | egrep 'download_count' | cut '-d:' -f 2 | sed 's/,/+/' | xargs echo | xargs -I N echo N 0 | bc