Compare commits
No commits in common. "f94b0ab07e9aa67c5969a055d766cac1636228f6" and "31319baa227545f4657dc37c5d973d5b9d835aeb" have entirely different histories.
f94b0ab07e
...
31319baa22
12
cbz2ebook.sh
12
cbz2ebook.sh
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i zsh -p imagemagick unzip zip zsh
|
||||
#!/usr/bin/env zsh -i
|
||||
set -e
|
||||
|
||||
size="1440x1920" # Kobo Forma
|
||||
|
@ -19,14 +18,7 @@ trap cleanup EXIT INT SIGTERM
|
|||
|
||||
cd "$tmpdir"
|
||||
unzip "$infile"
|
||||
|
||||
# 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
|
||||
|
||||
renumber 4 **/*.???
|
||||
length=$(ls -1 **/*.??? | wc -l)
|
||||
position=0
|
||||
for image in **/*.???; do
|
||||
|
|
Loading…
Reference in a new issue