View Single Post
Old 11-26-2018, 07:28 PM   #9
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,736
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by davidfor View Post
Which stuff are you trying to skip? An output plugin isn't about converting from a specific format to another. It is to allow converting from any format to the output format. Calibre is basically converting to an intermediate format and then converting that to the output format.
That's what I was thinking at first. I guess I will probably try creating a UI plugin. That will also solve the conflict with the kepub output plugin.

Quote:
If you want to skip that, and transform an existing epub to kepub, then either create a user interface plugin that runs kepubify and adds the output to the library, or an alternative to the KoboTouchExtended driver that does the transformation during the send-to-device.

Note: I use the word "transform" deliberately above to differentiate from a calibre conversion. The conversion can make a lot more changes than what the KoboTouchExtended driver does, and I assume that kepubify does.
Do you know how I can add something to the library (or at least where in the code to look)? I don't completely understand Calibre's architecture.

Quote:
There are a few plugins that extract files from themselves for some purpose. The Annotations plugin is one. That code was written by the original author, but it is called during calibre startup. It only does something if the files don't exist or need to be updated. I don't know if anything from the output plugins are called at that point. It might be possible to do when the configuration options are called. That will mean it is done only once for bulk conversion.

An alternative is what the DOC input plugin does. It needs a MS Word executable and has a configuration option to set the path to the executable.
Thanks for the pointers! I will probably go with having the user chooses the path, but I will look into the extraction on startup.
geek1011 is offline   Reply With Quote