View Single Post
Old 11-26-2018, 09:09 PM   #11
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 geek1011 View Post
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.

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.
I'll have a look for it. But, off the top of my head, two plugins that do this are FanFicFare and Obok (part of the DRM tools). The former is huge, but it can add newly created books to an existing calibre book.

Obok is a lot simpler but is intended to add a new book from scratch. I can't remember what it does if the book already exists in the library. I have a version of it that doesn't do the DRM removal. I've been meaning to add an option to let it add the book as a kepub instead of epub. At the time someone did the last rewrite of Obok, there wasn't much much point in doing that as the other plugins needed to fully handle kepubs didn't exist. Now, they do and if the kepub is based on epub3, I tend to add it to the library as a kepub as that works better on the Kobo devices.
Quote:
Thanks for the pointers! I will probably go with having the user chooses the path, but I will look into the extraction on startup.
The other thing you could do is have a user interface plugin to install kepubify. The output plugin could check for that and error if it doesn't exist. Plus it can supply all the paths needed. A little messy, but it should work.
davidfor is offline   Reply With Quote