KindleComicConverter
KindleComicConverter is a Python script wrapped by a MacOS X AppleScript droplet to convert image folders to a comic-type Mobipocket ebook to take advantage of the new Panel View mode on Amazon's Kindle.
REQUIREMENTS
- Python (included in MacOS and Linux, follow the official documentation to install on Windows)
kindlegenin /usr/local/bin/
for standalone comic2ebook.py script:
- unrar and rarfile.py for
calibre2ebook.pyautomatic CBR extracting.
You are strongly encouraged to get the Python Imaging Library that, altough optional, provides a bunch of comic optimizations like split double pages, resize to optimal resolution, improve contrast and palette, etc. Please refer to official documentation for installing into your system.
USAGE
Drop a folder or a CBZ/CBR file over the droplet, after a while you'll get a comic-type .mobi to sideload on your Kindle.
The script takes care of calling comic2ebook.py, kindlegen and kindlestrip.py.
WARNING: at the moment the droplet ALWAYS uses the KHD profile (Kindle Paperwhite). If you want to specify other profiles, please use the script from command line.
standalone comic2ebook.py usage:
-
Launch
python comic2ebook.py <profile> <directory|file> <title>The script takes care of unzipping/unrarring the file if it's an archive, creating a directory of images which should be then filled with a
.opf,.ncx, and many.htmlfiles. -
Run
Kindlegenoncontent.opf. Depending on how many images you have, this may take awhile. Once completed, the.mobifile should be in the directory. -
Remove the SRCS record to reduce the
.mobifilesize in half. You can use Kindlestrip. -
Copy the
.mobifile to your Kindle!
CREDITS
This script born as a cross-platform alternative to KindleComicParser by Dc5e (published in this mobileread forum thread)
The app relies and includes the following scripts/binaries:
- the
KindleStripscript © 2010-2012 by Paul Durrant and released in public domain (mobileread forum thread) - the
rarfile.pyscript © 2005-2011 Marko Kreen markokr@gmail.com, released with ISC License - the free version
unrarexecutable (downloadable from here, refer toLICENSE_unrar.txtfor further details) - the icon is by Nikolay Verin (http://ncrow.deviantart.com/) and released under CC Attribution-NonCommercial-ShareAlike 3.0 Unported License
- the
image.pyclass from Mangle
Also, you need to have kindlegen v2.7 (with KF8 support) which is downloadable from Amazon website
and installed in /usr/local/bin/
CHANGELOG
- 1.00 - Initial version
- 1.10 - Added support for CBZ/CBR files in comic2ebook.py
- 1.11 - Added support for CBZ/CBR files in KindleComicConverter
- 1.20 - Comic optimizations! Split pages not target-oriented (landscape with portrait target or portrait with landscape target), add palette and other image optimizations from Mangle. WARNING: PIL is required for all image mangling!
TODO
- Add gracefully exit for CBR if no rarfile.py and no unrar executable are found
- Improve error reporting
- Recurse into dirtree for multiple comics
- Create a GUI to allow user control more options
COPYRIGHT
Copyright (c) 2012 Ciro Mattia Gonano. See LICENSE.txt for further details.