Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 03-09-2015, 12:32 AM   #1
darryl
Guru
darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.
 
Posts: 894
Karma: 9241660
Join Date: Nov 2011
Location: Australia
Device: Kobo Aura H2O, Kindle Paperwhite 2, Huwei Ascend Mate 7 Android Phone
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.
darryl is offline   Reply With Quote
Old 03-09-2015, 01:12 AM   #2
darryl
Guru
darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.
 
Posts: 894
Karma: 9241660
Join Date: Nov 2011
Location: Australia
Device: Kobo Aura H2O, Kindle Paperwhite 2, Huwei Ascend Mate 7 Android Phone
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!
darryl is offline   Reply With Quote
 
Advertisement
Old 03-09-2015, 01:27 AM   #3
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 13,703
Karma: 51829994
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.
eschwartz is offline   Reply With Quote
Old 03-09-2015, 01:29 AM   #4
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: 7,560
Karma: 7511453
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD
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.
davidfor is online now   Reply With Quote
Old 03-09-2015, 01:37 AM   #5
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: 7,560
Karma: 7511453
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD
Quote:
Originally Posted by eschwartz View Post
Looking around, the only effort made to support KEPUB is telling calibre in a few key places to treat a KEPUB as an EPUB -- like the conversion pipeline.
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.
davidfor is online now   Reply With Quote
Old 03-09-2015, 01:42 AM   #6
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 13,703
Karma: 51829994
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.
eschwartz is offline   Reply With Quote
Old 03-09-2015, 02:06 AM   #7
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: 7,560
Karma: 7511453
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD
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.
davidfor is online now   Reply With Quote
Old 03-09-2015, 02:34 AM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 27,552
Karma: 5694717
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).
kovidgoyal is online now   Reply With Quote
Old 03-09-2015, 03:49 AM   #9
darryl
Guru
darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.
 
Posts: 894
Karma: 9241660
Join Date: Nov 2011
Location: Australia
Device: Kobo Aura H2O, Kindle Paperwhite 2, Huwei Ascend Mate 7 Android Phone
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.
darryl is offline   Reply With Quote
Old 03-09-2015, 09:52 AM   #10
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: 7,560
Karma: 7511453
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD
Quote:
Originally Posted by kovidgoyal View Post
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).
I can't say I blame you. I've been putting it off for ages and I might actually use them. I'll have a look at the input plugin and see if I want to do it or not.

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.
Attached Files
File Type: zip KEPUBMetadataReader.zip (668 Bytes, 21 views)
File Type: zip KEPUBMetadataWriter.zip (670 Bytes, 17 views)

Last edited by davidfor; 03-10-2015 at 05:17 AM. Reason: Now with added attachments.
davidfor is online now   Reply With Quote
Old 03-09-2015, 10:45 AM   #11
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 13,703
Karma: 51829994
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...
eschwartz is offline   Reply With Quote
Old 03-09-2015, 09:43 PM   #12
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: 7,560
Karma: 7511453
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD
Quote:
Originally Posted by eschwartz View Post
I don't see an attachment...
Neither do I. I remember selecting them and I'm sure they was listed before I finished the post. I don't have them with me, so I'll have to fix it when I get home tonight.
davidfor is online now   Reply With Quote
Old 03-31-2015, 08:53 AM   #13
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: 7,560
Karma: 7511453
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD
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.
Attached Files
File Type: zip KEPUBInput.zip (4.4 KB, 27 views)
File Type: zip KEPUBMetadataReader.zip (765 Bytes, 26 views)
File Type: zip KEPUBMetadataWriter.zip (1.7 KB, 29 views)
davidfor is online now   Reply With Quote
Old 04-16-2015, 12:00 PM   #14
razorsoup
Enthusiast
razorsoup began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Jan 2012
Location: Texas, USA
Device: Kodo Aura H2O
@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.
razorsoup is offline   Reply With Quote
Old 04-25-2015, 10:18 AM   #15
darryl
Guru
darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.
 
Posts: 894
Karma: 9241660
Join Date: Nov 2011
Location: Australia
Device: Kobo Aura H2O, Kindle Paperwhite 2, Huwei Ascend Mate 7 Android Phone
@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.
darryl is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Metadata Source Plugin] Kobo Books davidfor Plugins 2 06-22-2015 08:46 PM
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


All times are GMT -4. The time now is 03:48 AM.


MobileRead.com is a privately owned, operated and funded community.