It's a very nice eBook reader... so nice that a week after I bought another one for me :-)
Now, after some month, and after too many manually converted eBooks, I've decided that I need to automatize the PDF/RTF/mobi/whatever to EPUB format conversion.
This, as a side effect, will also enable my girlfriend do autonomously convert and upload her eBooks to her Kobo Touch :-)
To do that I wrote a script that will do the conversion from whatever format to EPUB, using Calibre and my standard format conversion parameters.
For my conversion needs, I've always used Calibre, its a very nice, powerful, and free eBooks management software.
Calibre can do an enormous amount of things... but in the end, after setting it up, I simply need it to take a PDF file and convert it to EPUB; then I will simply copy this EPUB on my Kobo.
After all a Kobo, when connected to a PC, will function exactly like a simple flash drive :-)
My tiny script will call the ebook-convert.exe command of Calibre, and will pass all the needed parameters.
The script will then create a new EPUB file in the same folder of the original file.
Download the script from here (Update: Download here the new version of the script, more info here)
Put the script in your Calibre executable folder
Drag and drop the file you want to convert to EPUB on the script
After the conversion, you'll find the new converted EPUB file in the same folder as the original file.
The filename should have the following format: "Authors - Title"
Something like "Isaac Asimov - Nightfall.pdf" is a good filename.
The first "-" will be used to separate author's name form title.
If there are no "-" in the filename, The author will be set to "unknown", so a file like "Nightfall.pdf" file will result in a "unknown - Nightfall.epub"
Extra conversion parameters
The script use some extra conversion parameter that, in my experience, works better that the default one:
- remove-paragraph-spacing: I hate empty space between paragraph
- flow-size 50: this will force the internak HTML files that compose the ebook to have a max file size of 50Kb, the end results is that the ebook reading experience will be faster
- unwrap-factor 0.25: (only for PDF files) help the algorithm that detect the PDF file structure, producing a better EPUB (in my limited experience)
If you need to add/change some conversion parameter, here you can find the parameters supported by ebook-converter.exe command.
I've updated the script, you can download the updated version here.
As requested by a reader the new version of the script can convert multiple files at once, and won't overwrite already existing epub.
Inside the script...
Here is a color-coded version of the EPUB conversion script, the same script you can download here. (Update: Download here the new version of the script, more info here)
(color coded version of the script created by the courtesy of http://hilite.me/)
UPDATE - How to set EPUB Authors and Title metadata from epub filname:
I've just created a new script that will modify the metadata on any EPUB.
This script will take the Authors and the Title from the filename, and will set them in the EPUB metadata.
So you can rename the EPUB file to something like "Asimov - Nightfall.epub" and then drag and drop this epub on my script: my script will set the epub metadata Authors/Title to the one you specified in the filename.
This script work using Calibre, so you need to place this script in the same folder where you have the Calibre executable.
The script is very similar to the one explained above, for epub format conversion. I simply use the "ebook-meta.exe" calibre command instead that "ebook-convert.exe".
You can download this script from the following link: Click here to download the script "Force Author Title on EPUB.cmd"
Feel free to ask any question :-)