03-09-2015, 12:32 AM | #1 |
Wizard
Posts: 3,108
Karma: 60231510
Join Date: Nov 2011
Location: Australia
Device: Kobo Aura H2O, Kindle Oasis, Huwei Ascend Mate 7
|
Metadata Plugboard Plugin and Kobo
Progress has slightly overtaken this plugin when sending KEPub format to Kobo and re-writing the title. All still works as intended provided that the Kobo extended touch driver is used and epub format rather than KEPub format is sent. The title is then re-written on the device and of course the extended driver does its job and the reader received a kepub file. However, this is not the case when KEPub is sent, either with the extended driver or the Kobo Touch Driver.
As Calibre now supports keeping ebooks in KEPub format ideally the Metadata Plugboard plugin should also support KEPub files. Unfortunately it is most unlikely that my script writing skills are up to the task, so I would like to request that this be placed on the list of future changes. It is not of course urgent as the extended driver does of course accomplish the same task. |
03-09-2015, 01:12 AM | #2 |
Wizard
Posts: 3,108
Karma: 60231510
Join Date: Nov 2011
Location: Australia
Device: Kobo Aura H2O, Kindle Oasis, Huwei Ascend Mate 7
|
Further to my above post I have had a quick look and made a very small dent on my ignorance. It seems that what is probably needed is a modification to at least one calibre binary file, ebook-meta, to support writing KEPub metadata. Looks like a job for Kovid!
|
03-09-2015, 01:27 AM | #3 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
All the binary exe's are wrappers that load the python source code HERE.
Looking around, the only effort made to support KEPUB is telling calibre in a few key places to treat a KEPUB as an EPUB (for very basic functionality). As far as send-to-device (and most of calibre) knows, KEPUB is Yet Another Unknown Format. All that is needed I would guess is to reimplement it as an ebook type plugin that subclasses EPUB, thus making calibre intrinsically aware of KEPUBs. And once that is done, it can (and should) incorporate the various tweaks and refinements that the current user-installed Output plugin does, etc. -- then calibre will have builtin support for KEPUB. Last edited by eschwartz; 03-09-2015 at 01:39 AM. |
03-09-2015, 01:29 AM | #4 |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
There is very little support for kepubs in the base calibre. The only things I can think of is to allow the viewer to open them and the server to send them with the extension "kepub.epub" to Kobo ereaders. The other support is via an optional plugin.
For the metadata plugboard to work for kepubs, a metadata writer plugin is needed. And ideally a metadata reader plugin to complete the function. It is not hard as it is basically sub-classing the epub code. The only different bit is the cover as that is specified in the OPF using an attribute that isn't used with epub2. I know I did either the reader or writer sometime in the past, but I haven't released them. Or maybe I posted it in the extended driver thread. I'll try and finish them in the near future. I'll also discuss with Kovid whether they should be integrated into calibre or released as separate plugins. I have a feeling there was something I couldn't see how to do if they were separate, but I can't think of what it was. |
03-09-2015, 01:37 AM | #5 |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
I don't remember seeing that. Unless it was done at the same time as allowing kepubs to be opened by the viewer, which would make sense.
|
03-09-2015, 01:42 AM | #6 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
I am guessing based on this: https://github.com/kovidgoyal/calibr...r.py#L706-L707
Probably done for the sake of the viewer, which technically converts a format into an OEB. I realized that was a slightly awkward description (I am not sure you can actually convert them, also it seems to say "view_kepub" so I am guessing no ) so I quickly reworded it. But you were quicker... Last edited by eschwartz; 03-09-2015 at 01:44 AM. |
03-09-2015, 02:06 AM | #7 |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Yes, that was what I was thinking of. The commit is https://github.com/kovidgoyal/calibr...4b5f987004ee49. And looking at that, the changes are only used for the viewer.
|
03-09-2015, 02:34 AM | #8 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That commit is a hack to allow the viewer to view kepub files, without writing a proper input plugin for kepub, since writing an input plugin will mean kepub can also be converted, and as I personally have no use for kepub I dont want to maintain such a plugin. If someone else wishes to commit to maintaining it, I have no objections to adding such a plugin (along with the accompanying metadata reader/writer plugins) to calibre. Or you can just develop and distribute such a set of plugins as standalone plugins.
Generally speaking I like to avoid adding support for single company ebook formats into the calibre core (there are of course exceptions [prominently lrf and the Kindle formats] and this is not a inviolable rule). |
03-09-2015, 03:49 AM | #9 |
Wizard
Posts: 3,108
Karma: 60231510
Join Date: Nov 2011
Location: Australia
Device: Kobo Aura H2O, Kindle Oasis, Huwei Ascend Mate 7
|
It's a shame my programming skills are not up to par. I imagine that a KEPub handler would simply be a slightly modified epub handler. Probably trivial if you know how. If I get a bit of time in the future I think I might try to learn some Python, but I suspect I would face a bit of a learning curve before I could make this type of modification.
Thank you to those who replied. |
03-09-2015, 09:52 AM | #10 | |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
In the meantime, for those who want to try it, I've attached the metadata reader and writer plugins. They are quick and dirty and simply sub-class the epub plugins. I haven't added the proper cover handling, but I'll look at later in the week. Last edited by davidfor; 03-10-2015 at 05:17 AM. Reason: Now with added attachments. |
|
03-09-2015, 10:45 AM | #11 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
I don't see an attachment...
|
03-09-2015, 09:43 PM | #12 |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
|
03-31-2015, 08:53 AM | #13 |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Now with added input plugin
I've done a little more work on this. Attached (I promise) is new versions of the kepub metadata reader and writer plugins plus an input plugin.
The metadata writer plugin set the cover property. That should mean the cover is correctly detected by the Kobo devices. The input plugin will let kepubs be converted to other formats. It reuses the epub plugin with the addition of removal of the Kobo spans. The available options are those from the epub input plugin plus an option fore removing the spans. I haven't done a lot of testing, but they all seem to work. If anyone is still interested, try them and tell me how it goes. If you find a problem, I'll have a look at it. I haven't yet decided how to release these, but, won't be doing anything until after Easter. |
04-16-2015, 12:00 PM | #14 |
Enthusiast
Posts: 33
Karma: 10
Join Date: Jan 2012
Location: Texas, USA
Device: Kindle Paperwhite 4
|
@davidfor: Thank you for this. I was having trouble getting the metadata plugboard I had previously used for my Kindle (to add series info to the title) to work for my Kobo. I narrowed the problem down to the fact that I was transferring kepubs to the device and Calibre wasn't updating the metadata. These plugins seem to have resolved that issue for me.
|
04-25-2015, 10:18 AM | #15 |
Wizard
Posts: 3,108
Karma: 60231510
Join Date: Nov 2011
Location: Australia
Device: Kobo Aura H2O, Kindle Oasis, Huwei Ascend Mate 7
|
@davidfor. My thanks also for these plugins They work beautifully and do exactly what I want Works great with a plubboard to help handle series. Also makes it more convenient when I want to transfer an epub rather than a kepub, as I no longer need to use the extended driver.
Once again, thanks. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Metadata Source Plugin] Kobo Books | davidfor | Plugins | 201 | 10-17-2023 11:19 AM |
Metadata Plugboard - I don't get it... | _daclaus | Library Management | 3 | 08-25-2013 12:13 PM |
metadata plugboard not doing anything on kobo touch | SonjaD | Library Management | 2 | 07-13-2013 11:10 AM |
Conflict between plugin, plugboard, and perhaps PRS+ | denverh | Plugins | 2 | 04-09-2012 10:18 AM |
Metadata Plugboard | IxiaAurea | Calibre | 1 | 11-05-2011 01:13 PM |