configuration/local/bin/manga_maker

19 lines
495 B
Plaintext
Raw Permalink Normal View History

2015-07-05 16:16:23 +02:00
#!/bin/bash
# turn cbz files created by manga_downloader.py into scrollable pdf's
input="$1"
output="${input%.cbz}.pdf"
# unzipping the cbz
image_files="$(mktemp)"
unzip "$input" | sed -n 's/.*extracting: \(.*\)/\1/p' > "$image_files"
# makeing them pdf's
cat "$image_files" <(echo "-compress jpeg") <(echo "$output") | xargs convert
# convert *.jpg -compress jpeg -resize 1240x1753 -units PixelsPerInch -density 150x150 -page a4 second.pdf
2015-07-05 16:16:23 +02:00
cat "$image_files" | xargs rm
rm "$image_files"