Skip to content

Instantly share code, notes, and snippets.

@oxagast
Last active March 24, 2017 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oxagast/57f9a88fb93b65a5f25bbbc0be9e9479 to your computer and use it in GitHub Desktop.
Save oxagast/57f9a88fb93b65a5f25bbbc0be9e9479 to your computer and use it in GitHub Desktop.
Get the total number of GitHub release downloads over all time for a project
REPO=ansvif; GITUSER=oxagast; curl -s https://api.github.com/repos/$GITUSER/$REPO/releases | grep download_count | sed -e 's/.*: //' -e 's/,/ + /' | tr -d '\n' | sed -e 's/+ $/\n/' | bc | tr -d '\n' ; echo " All time clones of $REPO."
@oxagast
Copy link
Author

oxagast commented Mar 24, 2017

This grabs the total number of downloads of a project from GitHub from the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment