View Single Post
Old 01-16-2013, 04:26 PM   #1
Tumeconnais
Junior Member
Tumeconnais began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2013
Device: Kobo Glo By fnac
Plugin calibre epub to kepub

Hi everyone,

I have found this github https://github.com/kenjis/epub-converter
this plug in, convert automatically your Epub in kepub, and you know, kepub is very usefull but lot of problem are in it, and lot of feature too, but this, fix a problem with annotations, and normally give you cover back on your kobo.

I have installed it, but the problem is, the plug in don't add image in .kobo/libary, the modification on a sql database is good, but not the transfer of picture.
I dunno how modify a code source, i'm not so good in python, i'm trying, if a someone can help me for fix this, or do this.
this plug in is inspired by this web site :
http://dsandrei.blogspot.fr/2012/07/...99486355321782

this is the explication of Joel goguen, how it work :
Quote:
I'm working on an extension to the Calibre Kobo Touch driver to auto-magically handle most of this when sending an ePub file to a Kobo Touch/Glo/Mini. I only have a Glo to test with though, but it looks like everything should be the same from the database side. I'm using lxml directly, I found that using BeautifulSoup caused more issues than it was worth (mostly around poorly-converted ePubs or some ePubs from the Kobo store that have intermingled file encodings) and lxml handled them much better.

Here's what the driver currently does if the uploaded file ends in '.epub':
1. For all h[1-6] and p tags in every HTML file, wrap the contents of the tag in a span tag with id attribute "kobo.X.1", where X is an incrementing counter starting at 1, reset with each file. The driver checks for the existence of these span tags and skips this processing on a per-tag basis. There's no validation that existing tags aren't duplicated elsewhere so it would be a bad idea to pass a half-processed file through this. It will still work on the device, but annotations and last read position might get wonky.
2. Ensure the file name on the device ends with the required '.kepub.epub', so adding this to preferences somewhere is not required.
3. Generate the database entries for each ePub file. There's an entry for the book itself, entries for anything in toc.ncx, and an entry for each individual HTML file defined in content.opf. The database entries I add include series information and the proper Image ID, but this doesn't stop the Kobo device from processing the new books after unplugging the device, which strips out series and image ID data. Still working on how to prevent the device from automatically processing these files.
4. Every time metadata is synced to the device, re-set the Image ID field for every book entry with a NULL ImageId field.

The images are already uploaded and properly sized by Calibre so there isn't any need to deal with converting/sizing images. They (and series information, if you're setting it) won't display the first time you eject the device after copying the books but plug it back in after the Kobo does its processing, let calibre update the metadata, and it'll be ready to go.

I'm not sure it's ready for publishing yet (I'm still testing some things around ePubs, haven't tried non-ePub files yet) but the source is on Github at https://github.com/jgoguen/calibre-kobo-driver for anyone that wants to try it out. The usual disclaimers (at your own risk, your mileage may vary, back up your data before you start, not my fault if anything breaks or explodes or ignites or if Zerg start crawling out of your computer) all apply.
I think, we need to write a function, for open ebook, take a .jpeg of the cover, or take it directly with calibre, and duplicate in 3 .jpeg, one of them is : [Name of ebook]N3_LIBRARY_FULL.parsed, an other is : [Name of Ebook] N3_LIBRARY_GRID.parsed and finally : [Name of ebook] N3_FULL.parsed
the resolution of picture, we doesn't care, i have tried manuelly, with only one picture, and it work.
If you have a question, I'm here.
thank you very much for you help.
Sorry for my bad english, i'm french


Edit : For some User, cover book works, when he make this procedure :
-in calibre, you have to set the metadata managment to "automatic", then, copy the books in your kobo, unplug, plug back and the program calibre will send a new stream of metadata; unplug again, and you'll have your covers.
-to set the metadata managment to automatic go to Preferences | Import/Export | Sending books to devices and change it.
for me doesn't work :-(
And for you?

Last edited by Tumeconnais; 01-21-2013 at 04:20 PM.
Tumeconnais is offline   Reply With Quote