Quote:
Originally Posted by giddie
Thanks; I guess the official solution is to store kepubs as epubs then.
|
I've tried to be explicit about the importance of keeping a non-KePub format in your calibre library. The KePub format isn't documented so what I have is an attempt at reverse-engineering the rules and details based on existing books. The only time it would be OK to have only the KePub format for a book is if you downloaded the KePub directly from Kobo.
Quote:
Originally Posted by giddie
Can the extended driver be relied on to always do the right thing? It's not possible it might accidentally add duplicate spans due to a false-negative?
|
I would be surprised if duplicate spans would get added. I search each HTML file for any node which has class 'koboSpan' or which has an id attribute beginning with 'kobo.'; if any single HTML element is found with either of those conditions true, I assume the file is already converted and skip it.
Like davidfor said, it would not be difficult to fool this plugin (or the extended driver, the conversion code is shared between them). But that would prevent adding spans. To fool it into adding duplicate spans you would need to preprocess all content files to change the class and id attributes, then run the conversion, then post-process the file to restore the original class and id attributes. And at that point it's not a bug in the conversion that duplicate spans get added
What would be possible is if Kobo changes the KePub format (it's their own format officially not implemented anywhere else, they can change it anytime they want for any reason) and that update completely changes both the class and id attributes or uses a tag other than "span". But I doubt that's likely to happen.