View Single Post
Old 11-26-2018, 09:33 PM   #13
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,804
Karma: 7025947
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by jackie_w View Post
@geek1011,

I don't know whether this is useful to you or not ...

I have a few personal calibre UI plugins which contain 3rd-party executables (e.g. LAME.exe, epubcheck.jar) in their zip file. The technique I have always used for these is to do a one-off extract to a calibre temp directory (during the processing of the first epub) which I know will exist for the duration of the rest of the multi-epub batch looping. The only one that I've published in the calibre Index of Plugins which does this is my 'TTS to MP3' plugin. You could have a look at the code (utils.py/extract_executable) to see whether any of it is useful to you.

When exploding-manipulating-rezipping epubs I always use calibre's standard container functions because Kovid's already thought of and solved more potential problems than I could ever think up on my own. (Not only that, but he keeps them all up-to-date without me having to lift a finger ) All exploded epubs in the same batch automatically share the same parent temp directory, so I use this parent as the calibre temp directory to extract the 3rd-party executables to. It also gets auto-deleted when calibre is closed.

In addition, FWIW, I have a personal 'Epub to Kepub' calibre UI plugin which uses a QProgressDialog to loop around a selection of calibre epubs, format-shifting to kepub then auto-adding the kepub into the calibre library. I have no intention of ever publishing it because it's designed to satisfy my own kepub whims, not just those included in the KoboTouchExtended driver or in kepubify. Nevertheless, you're more than welcome to have a look if it might be helpful from a general UI plugin POV.
I got your PM. Thanks so much!
geek1011 is offline   Reply With Quote