Created
November 21, 2018 09:42
-
-
Save neuman/19d7d71864d7e8e7c1e4c21aa39a2f82 to your computer and use it in GitHub Desktop.
Convert PDF to CBZ in Bash
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
for i in *.pdf | |
do | |
if test -f "$i" | |
then | |
echo "Converting $i to ${i%.*}.cbz" | |
convert -density 150 "$i" -quality 90 output.png | |
zip -R "${i%.*}".cbz '*.png' | |
rm *.png | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment