View Single Post
Old 08-22-2012, 11:14 AM   #1
Claghorn
Member
Claghorn began at the beginning.
 
Claghorn's Avatar
 
Posts: 10
Karma: 10
Join Date: Aug 2012
Device: Nexus 7
A couple of handy conversion scripts.

My web page documenting my experiences converting a giant book from mobi to ebub has a couple of script people might find useful (or even want to steal and incorporate into calibre). The web page is here:

http://home.comcast.net/~tomhorsley/game/calibre.html

Search for jpg-to-png to find the script that replaces opaque grayscale jpg files with black png images with different transparency levels so nice non-white backgrounds show through and the images look more natural in an ebook reader where you have set a non-white background. (Warning: Don't run this too early in the conversion process or something in calibre removes the transparency and you are left with just black boxes - I typically just use tweak book to run it last after everything else). This is a bit of a frankenstein monster that uses gimp and perl and imagemagic, but it gets the job done.

Another script I found useful to run in the DEBUG/input directory to tweak a conversion early was markup-from-toc which embeds the contents of the toc.ncx file into the html as markup with class=chapter attributes so you can tell the converter to look for those and rebuild the proper toc (assuming the .ncx file is correct to start with).
Claghorn is offline   Reply With Quote