Hi !
I've recently bought a Kobo Touch, and I've made a little script based on 7z and imagemagick to optimize comic scanlation for Kobo.
I hope it could help somebody. It takes comic archive as argument, and should work on any Linux distribution with 7zip and imagemagick installed.
When the script have finished , a new comic archive is created with -kobo suffix.
I've recently bought a Kobo Touch, and I've made a little script based on 7z and imagemagick to optimize comic scanlation for Kobo.
I hope it could help somebody. It takes comic archive as argument, and should work on any Linux distribution with 7zip and imagemagick installed.
When the script have finished , a new comic archive is created with -kobo suffix.
Code:
#!/bin/sh
TOLERANCE=4%
JPG_QUALITY=75
SIZE=600x800
TMP_DIR=/tmp/koboTest
INPUT_COMIC_TYPE=.cbr
rm -rf $TMP_DIR
mkdir $TMP_DIR
7z e "$1" -o$TMP_DIR
for i in $TMP_DIR/*
do
convert "$i" -fuzz $TOLERANCE -quality $JPG_QUALITY -resize $SIZE -trim +repage -colorspace gray "$i"
done
7z a -tzip -w$TMP_DIR "`basename "$1" $INPUT_COMIC_TYPE`"-kobo.cbz $TMP_DIR/*
rm -rf $TMP_DIR