Skip to content

Instantly share code, notes, and snippets.

@BonyChops
Last active May 27, 2022 04:49
Show Gist options
  • Save BonyChops/ce3d0ec95d9c16a6564b964068c1aaf3 to your computer and use it in GitHub Desktop.
Save BonyChops/ce3d0ec95d9c16a6564b964068c1aaf3 to your computer and use it in GitHub Desktop.
Count total count of releases' downloads
#!/usr/bin/env bash
user="BonyChops"
repo="Game-Console-Activity-to-Discord"
node -e "console.log(($( curl \
--silent \
--header "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/$user/$repo/releases )).map(v => v.assets.reduce((acc,vv) => (acc + vv.download_count), 0)).reduce((acc,v) => acc+v , 0))"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment