Created
April 22, 2012 18:02
-
-
Save gerjantd/2465765 to your computer and use it in GitHub Desktop.
Github: API v1 call for retrieving my public gists (obsolete)
This file contains hidden or 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
wget -O `date +%Y%m%d`-gerjantd-public-gists.json http://gist.github.com/api/v1/json/gists/gerjantd | |
Format the downloaded json: | |
sudo apt-get install libjson-perl | |
sudo apt-get install curl | |
curl http://gist.github.com/api/v1/json/gists/gerjantd | json_xs | |
Automate cloning of all gists: | |
mkdir mygists | |
cd mygists | |
curl -s http://gist.github.com/api/v1/json/gists/gerjantd | json_xs |grep "\"repo\""|awk -F "\"" '{print $4}' > repos | |
for g in `cat repos`; do git clone [email protected]:$g.git gist-$g; done | |
rm repos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment