View Single Post
Old 07-28-2010, 07:12 AM   #7
mattepiu
Junior Member
mattepiu began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jun 2008
Device: PRS-650
Thank you!

Really nice program, I'm actually using it however I have a couple suggestions:
1) Spaces into filenames is really an ugly bug and I'm quite sure there's some way java can handle them, for example with bash you should enclose filenames variables in "" (see below).
2) Would be great to have some command line option more, like one for where to find the profile file and some for the most used parameters like width/dpi/colors
3) Resize is great but not if page is already smaller than values given, imagemagick has an option to "Only Shrink Larger Images" that's like : "-resize 64x64\>" where the "\>" tells imagemagick to only shrink.... it's already used? (I found it here)

For now I'm using it through linux and this is my bash script to bypass spaces issue, need to customize CANTIDIR and then converts pdf into cbz:
Code:
CUR=$(pwd)
#Select here the directory where you put Canti.jar and profile file
CANTIDIR="/mnt/xmedia/ecomics/Canti"

ALPHA=$(basename "$1")
BETA=${ALPHA%%.*}
GAMMA=temp
ZETA=$(dirname "$1")
cd "$ZETA"
TETA="${ALPHA// /_}"
ETETA="${TETA%%.*}"
mkdir temp
if [ "x$2" == "x" ]; then
convert "$1" "temp/%04d.jpg"
else
convert -density $2 "$1" "temp/%04d.jpg" || exit 1
fi
cd "$CANTIDIR"
java -jar "Canti.jar" -parent_folder "$ZETA/temp" -title "$ETETA"
mv "$ZETA/OUT/$ETETA.cbz" "$ZETA/"
rm -rf "$ZETA/OUT"
rm -rf "$ZETA/temp"
again

Last edited by mattepiu; 07-28-2010 at 09:22 AM.
mattepiu is offline   Reply With Quote