Created
April 4, 2013 07:26
-
-
Save rvbhute/5308505 to your computer and use it in GitHub Desktop.
Two versions for creating CBZ (Comic Book archive) files out of a directory of images. These files can be opened in comic readers. In Linux, applications like Evince also handle CBZ files with ease.
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/sh | |
# First version, to use only a particular file-type in a folder | |
for f in `ls -l | egrep '^d' | awk '{print $NF}'` | |
do | |
cd $f | |
zip $f.cbz *.jpg | |
mv $f.cbz ../$f.cbz | |
cd .. | |
done | |
# Second version, useful if images are multiple file formats | |
# Be careful to clear out non-image files first! | |
for f in `ls -l | egrep '^d' | awk '{print $NF}'` | |
do | |
zip $f.cbz $f/*.* | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment