Compare commits
2 Commits
31319baa22
...
f94b0ab07e
Author | SHA1 | Date |
---|---|---|
Simon Bruder | f94b0ab07e | |
Simon Bruder | 86283411ad |
12
cbz2ebook.sh
12
cbz2ebook.sh
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env zsh -i
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i zsh -p imagemagick unzip zip zsh
|
||||
set -e
|
||||
|
||||
size="1440x1920" # Kobo Forma
|
||||
|
@ -18,7 +19,14 @@ trap cleanup EXIT INT SIGTERM
|
|||
|
||||
cd "$tmpdir"
|
||||
unzip "$infile"
|
||||
renumber 4 **/*.???
|
||||
|
||||
# rename files to have a plain 4 digit filename
|
||||
i=1
|
||||
for file in **/*.???; do
|
||||
mv -n "$file" "$(dirname $file)/$(printf %04d $i).${file##*.}"
|
||||
i=$((i+1))
|
||||
done
|
||||
|
||||
length=$(ls -1 **/*.??? | wc -l)
|
||||
position=0
|
||||
for image in **/*.???; do
|
||||
|
|
Loading…
Reference in New Issue