Last active
May 13, 2023 00:29
-
-
Save jaimevalero/3db5c5753373b37d1e687700d2039b07 to your computer and use it in GitHub Desktop.
Which awesome resource has more awesomess in an awesome list
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
# Order an awesome list by number stars. | |
# | |
# Tis one liner scripts extracts the number of stars from each repo from a given awesome list, and order repos by the number of start | |
# This one liner uses jq command, so you should have it installed in your machine | |
# Parameter | |
# Awesome List to extract, in raw | |
AWESOME_LIST=https://raw.githubusercontent.com/pditommaso/awesome-pipeline/master/README.md | |
#CREDENTIALS="jaimevalero:mysecret" | |
CREDENTIALS="replace-for-your-github-user:replace-for-your-github-password" | |
curl -L --user "$CREDENTIALS" -s "$AWESOME_LIST" | \ | |
egrep -E -o 'https://github.com/.*/.*\)' | \ | |
cut -d\/ -f 4-5 | cut -d\) -f1 | \ | |
while read line ; do \ | |
echo "[$line](https://github.com/$line)" \| \ | |
`curl --user "$CREDENTIALS" -s -L -k "https://api.github.com/repos/$line" | \ | |
jq -c '[ .stargazers_count ,"ยบ" , .description , "ยบ"] ' | \ | |
tr -d '\[' | tr -d '\]' | tr -d ',' | tr -d '\"' | tr -d '\|' | tr 'ยบ' '|' `; \ | |
done | sort -r -u -t \| -k2 -n | sed -e 's/^/\|/g' | sed -e 's@||@|@g' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For https://github.com/agarrharr/awesome-cli-apps
npm publish