Created
December 12, 2023 20:02
-
-
Save arthuRHD/defe0db8545288300e80281ffe416f25 to your computer and use it in GitHub Desktop.
Download the latest one piece chapter and aggregate each scan inside a PDF
This file contains 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 | |
# Prerequirements: | |
# - sudo apt install img2pdf ocrmypdf | |
# - internet access | |
for i in {01..30}; do | |
url="https://lelscans.net/mangas/one-piece/$1/$i.jpg" | |
curl -sf $url -o onepiece_${i}.jpg # assuming there is around 30 pages by chapter | |
done | |
echo "Scans retrieved" | |
img2pdf onepiece_*.jpg --output combined.pdf | |
ocrmypdf combined.pdf $1.pdf | |
rm combined.pdf onepiece_*.jpg | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment