Created
November 28, 2014 22:08
-
-
Save anupdhml/0f0de57a449630bb89b9 to your computer and use it in GitHub Desktop.
Convert pdf to cbz
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 | |
# Simple script to convert pdfs to cbz (good for comics) | |
for pdf in *.pdf; do | |
echo "Converting ${pdf}..." | |
filename="${pdf%.*}" | |
pdftoppm -jpeg "$pdf" "$filename" && | |
mkdir "$filename" && | |
mv *.jpg "$filename" && | |
zip -rq "$filename".cbz "$filename" | |
echo "" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment