Skip to content

Instantly share code, notes, and snippets.

@anupdhml
Created November 28, 2014 22:08
Show Gist options
  • Save anupdhml/0f0de57a449630bb89b9 to your computer and use it in GitHub Desktop.
Save anupdhml/0f0de57a449630bb89b9 to your computer and use it in GitHub Desktop.
Convert pdf to cbz
#!/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