Skip to content

Instantly share code, notes, and snippets.

@pi8027
Created September 28, 2012 14:00
Show Gist options
  • Save pi8027/3800040 to your computer and use it in GitHub Desktop.
Save pi8027/3800040 to your computer and use it in GitHub Desktop.
github の検索結果の上の方のリポジトリを適当に clone する。
#!/bin/zsh
keyword=coq
language=Coq
for pageindex in {1..10} ; do
wget -q "https://github.com/search?q=${keyword}&start_value=${pageindex}&type=Repositories&language=${language}" -Otmp.html
echo 'cat //div[attribute::class="result"]/h2/a/attribute::href' | \
xmllint --shell --html tmp.html | sed '/href/ { s/^.*"\/\(.*\)"/\1/g p } ; d'
done 2> /dev/null | while read l ; do ; git clone git://github.com/$l repos/$l ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment