Thread: PRS-650 Reading Manga
View Single Post
Old 01-10-2011, 01:08 AM   #4
farrioth
Enthusiast
farrioth began at the beginning.
 
Posts: 36
Karma: 12
Join Date: Aug 2010
Device: Kobo eReader
Quote:
Originally Posted by DillonBladez View Post
My first problem is that I have downloaded some manga, all in jpg. One image covers two pages, and the book reads right to left. I first converted to zip>cbz>epub. But when reading on the device, i get say page 6 before page 5. I know I could manually fix this but it's a little time consuming and I was wondering if there was a way I could get calibre to do this automatically. I'm sorry if this has already been discussed, but I wasn't really sure what to search...
Extract your cbz file, use a script like the below to rename the images, then recompress the cbz.

The script assumes your original images are being cropped so that there is one page per image, and the filenames are of the format image1.jpg; change pren and postn below as appropriate. There should be no line breaks in the script and it should be run in the directory containing the images.

Code:
pren=image; postn=.jpg ; for i in $(seq 1 2 $(ls | wc -l)) ; do mv $pren$i$postn foo ; mv $pren$(($i+1))$postn $pren$i$postn ; mv foo $pren$(($i+1))$postn ; done
farrioth is offline   Reply With Quote