Skip to content

Instantly share code, notes, and snippets.

@arthuRHD
Created April 13, 2024 12:54
Show Gist options
  • Save arthuRHD/564186e284332323182269dbc261d76d to your computer and use it in GitHub Desktop.
Save arthuRHD/564186e284332323182269dbc261d76d to your computer and use it in GitHub Desktop.
One Piece scans without ads
#!/bin/bash
# Download the latest one piece chapter and aggregate each scan inside a PDF
#
# Prerequirements:
# - sudo apt install img2pdf ocrmypdf
# - internet access
if [ -z $1 ]; then
echo "You need to provide a chapter number"
exit 1
fi
for i in {01..30}; do
url="https://lelscans.net/mangas/one-piece/$1/$i.jpg"
curl -sf $url -o onepiece_$1_$i.jpg
done
echo "Scan retrieved."
img2pdf onepiece_$1_*.jpg --output $1.pdf
echo "PDF generated"
# taking too much time
# ocrmypdf combined_$1.pdf $1.pdf
rm onepiece_$1_*.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment