Skip to content

Instantly share code, notes, and snippets.

@neuman
Created November 21, 2018 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neuman/19d7d71864d7e8e7c1e4c21aa39a2f82 to your computer and use it in GitHub Desktop.
Save neuman/19d7d71864d7e8e7c1e4c21aa39a2f82 to your computer and use it in GitHub Desktop.
Convert PDF to CBZ in Bash
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