View Single Post
Old 02-13-2013, 08:12 AM   #9
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by kc7zzv View Post
You're right. I remembered wrong. It was a custom attribute in one of the meta files, in regard to the cover.
That isn't correct. When a kepub is synced from the Kobo servers, the cover image is supplied separately. And the database entries aren't added in the same way as when a book is sideload. But, I assume you are talking about about the "cover-image" property. From looking at non-DRM kepubs, this is not used in them. My understanding is this is a property is from the epub3 spec. Adding it to a kepub, which is really a epub2, is a cheat I discovered a few weeks ago. I assume it works because Kobo is using the same code to handle epub3 and their kepubs.
Quote:

As for splitting, I was oversimplifying. Basically, Calibre splits stories at a size that gives HORRENDOUS performance on my Kobo. I assume this value is a sane default on most devices, and I know it's a sane default on my old Kindle, but on the Kobo, it sucks. I assume this is optimized for 95% of readers, so this isn't a bug in Calibre. I want to see what I can do here, and because the Kobo needs more breaks, I want to see if I can make the splitting smarter.
I don't know why you are seeing that performance. I recently took a 30 chapter epub that was built with one chapter per file and combined them down to three files. The sizes where about 350KB, 250KB and 700KB each. This worked perfectly on the device with no noticeable performance from the split version.

But if the sizes are the problem, you have your conversion options set wrong. You should use the "Structure Detection" page of the conversion options to split the files into chapter based files in the epub. This is what you are saying is needed to be done to create a kepubs, so you will be relying on those options anyway.

And to be clear, a kepub does not have to be split up into a file per chapter. They follow the exact same rules for this as an epub. The designer of the book decides how to do it and Kobo just adds the extra spans and ids. I haven't seen many kepubs that don't split the chapters, but I do have some. And an important thing is that every kepub I have looked at, has exactly the same file structure as the epub I also got from the Kobo shop.
Quote:
Also, I want to change the files into something that can take full advantage of the "kepub reader" that Kobos have. Mostly, adding the ids, adding a simple checkbox for the css needed to help the Kobo remember the correct page. No, that's not a typo. Formatting can make the Kobo not remember the page at all. So, you might think that those features aren't worth the effort, but I do.
Quote:
To be honest, I don't like the kepub reader. I don't like the space taken at the top of the screen by the title all the time. I don't like the per-chapter page numbering. The only thing that tempts me to read the kepub version of books I have bought is the reading stats. They are nice, but I am not hooked on them.
> There is also no point in adding DRM protected kepubs to calibre.

Agreed.

> Finally, there is already a driver being developed to send epubs to the Kobo devices as kepubs. This is at https://github.com/jgoguen/calibre-kobo-driver. This does the updates to the epubs when the book is sent to the device. I will be merging this into the current driver when I am happy that it works well and I have time. Last time I checked, it would handle at least 90% of the epubs out there. The ones it doesn't would probably work after a calibre conversion. This has been discussed in the Kobo forum.

My goal is to make this work with that plugin. I want the books per-converted and in my library, where it's easier to tweak them, and to make transferring to the Kobo faster after the first conversion, at the cost of some space.
If kepub handling is added to calibre, that driver or updates to the current driver are not needed. The only thing that is needed is to add kepub to the list of formats that the driver handles. And to make sure the extension is handled correctly. If you are looking at a version of Joel's driver that does database updates, they will definitely not be in the merged driver. And looking at the code, Joel has pulled them out as there are two many issues with them.

Performance is a valid consideration. But, I suspect most will still be done when sent to the device the first time. And how many will be sent multiple times? The main times would be when you change the book for some reason. In that case, editing the original source makes more sense than the converted kepub.
Quote:
So, to make a long story short, yes, you can use epubs on a Kobo, but if you want to make them work very well, you have to apply a lot of tweaks, including changing the file name. And, those changes makes the epub worst in most other readers. To me, that's justification for treating it as a separate format, considering that it already has a separate extension.
What changes are you talking about? I tweak my epubs, but that is because I prefer them to look like paper books. In fact, if I have a paper version, I use that as the guide. But, I would be stunned if I am doing anything that would make it look worse on other readers. About the only thing I do that I think is specific to the Kobo reader is to push chapter headings low enough on the screen that they aren't hidden by the top menu when it is displayed. If you have have some examples, I would love to hear what they are.

The reference to file name changes here has me confused. Are you talking about changes to get the epub treated as a kepub? Or when you want to just use it as an epub? Because of the rest of the paragraph, I assume the latter. But what changes do you need to make? The default calibre save template and file name handling works perfectly. The only issue I can think of is related to unusual characters in the title of a book. As the save template used these in the file name, that caused problem. The fix was actually to correct the book title.

I know I am being discouraging about this. I have thought about this on and off since I started working on the driver. I have never seen enough advantage to it. When Joel's driver turned up, I thought that was a better way to handle this. kepubs are only useful in one place, so keep them there.

Having said all the above, if you go ahead and do this, I'll watch with interest. And I'll help however I can. That is especially so for the testing. If this is done, I want it working properly. Also, if any changes are needed in the driver, I'll make them.
davidfor is offline   Reply With Quote