Created
May 22, 2016 08:02
-
-
Save marianogappa/2a3169a75859240a6c9ff9e0b237bf5a to your computer and use it in GitHub Desktop.
Byte count per programming language on your github account
This file contains 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
USER=my_github_username | |
ACCESS_TOKEN=my_github_access_token | |
curl -u $USER:$ACCESS_TOKEN -s "https://api.github.com/user/repos" | jq -r 'map(.languages_url) | .[]' | xargs curl -s -u $USER:$ACCESS_TOKEN | jq -r '. as $in| keys[] | [.+ " "]+[$in[.] | tostring] | add' | awk '{arr[$1]+=$2} END {for (i in arr) {print i,arr[i]}}' | awk '{print $2, $1}' | sort -nr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment