Created
December 21, 2018 10:54
-
-
Save arvidj/a5149145e1761bc7dd6a9718f44c1ce8 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
page=1 | |
while true; do | |
echo $page; | |
if ! wget "https://api.github.com/users/standardebooks/repos?page=$page" -O "repos.$page"; then | |
break; | |
fi; | |
page=$(($page + 1)) | |
for i in `grep full_name repos.$page | cut -d\" -f 4 | cut -d/ -f 2`; do | |
url="https://standardebooks.org/ebooks/"${i/_//}"/dist/$i.epub" | |
wget $url | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment