Skip to content

Instantly share code, notes, and snippets.

@royharoush
Last active June 30, 2016 06:04
Show Gist options
  • Save royharoush/a802e5046fa1b5502f33 to your computer and use it in GitHub Desktop.
Save royharoush/a802e5046fa1b5502f33 to your computer and use it in GitHub Desktop.
one liner to grab the list of starred projects by a user
for page in 1 2 3 4 ; do curl "https://api.github.com/users/$1/$2?page=$page&per_page=99" | grep 'name\|"description\|clone_url' | sed s'\,\\' | sed "/\b\(labels_url\|full_name\)\b/d" |tr -d '"' | sed s'jname:j##############j' | sed s'kdescription:k###k'| sed s'sclone_url:sgit clones' | awk '$1=="##############"{x=$0;next} $1=="###"{print x, $0; next} 1' | sed 's/^ *//' ;done >$1-$2.txt
#for page in 1 2 3 4 ; do curl "https://api.github.com/users/royharoush/starred?page=$page&per_page=99" | grep 'name\|"description\|clone_url' | sed s'\,\\' | sed "/\b\(labels_url\|full_name\)\b/d" |tr -d '"' | sed s'jname:j##############j' | sed s'kdescription:k###k'| sed s'sclone_url:sgit clones' | awk '$1=="##############"{x=$0;next} $1=="###"{print x, $0; next} 1' | sed 's/^ *//' ;done >mystarred.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment