Today I want to share with you a small bash script I created to download all the Quran pages and then build a pdf of the whole book. I used this script to generate a 800px resolution book for my Kindle Touch. You can change the resolution by modifing the RESOLUTION variable.
#!/bin/bash RESOLUTION=800 LINK=http://labs.quran.com/androidquran for f in $(seq -f "page%03g.png" 604) do echo "downloading width_$RESOLUTION/$f" wget -c $LINK/width_$RESOLUTION/$f > /dev/null 2>&1 done echo "building the pdf" convert page*.png quran.pdf echo "Deleting downloaded images... " rm page*.png echo "Done. "
Attention: if any error occurred during the building step, you should relaunch the script because the pdf will miss some pages (it must contain exactly 604 pages).