![]() |
#1 |
Plugin developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 108
Karma: 24394
Join Date: Feb 2012
Location: Lithuania
Device: Kindle
|
External plugin: how to add PluginWidget into conversion window?
After pressing "C" and bringing up the conversion windows, on the left sidebar one can choose various options. According to selected output format there is also a button for the output, e.g. "EPUB Output" or "MOBI Output". When converting from some specific formats, like PDF, there is also "PDF Input". I've found these panels are developed as PluginWidgets with UI_Form.
I am working on DOCX Input plugin, which I would like to have such "DOCX Input" widget. I have created it, added to package initialization, but it does not appear. Then I've checked Calibre's code and found, what in my opinion shows it, that only "native" plugins can have those PluginWidgets. The code snippet here: def config_widget_for_input_plugin(plugin): name = plugin.name.lower().replace(' ', '_') try: return importlib.import_module( 'calibre.gui2.convert.'+name).PluginWidget except ImportError: pass Not sure, if this same procedure should load also external plugin's Widgets. Also, I believe, this widget should appear in "Common Options" to set some properties to be "sticky" or "default". Currenly my workaround is simple ConfigWidget. But it is very inconvenient, when for some particular document one wants to check particular options and needs to navigate deeply into plugin's configuration via "Customize Plugin"... So is there a possibility for external plugin to have PluginWidget and if yes, how to properly do that? When it is simply put into dependencies, it does not appear. And if it is not possible, could I request such a feature in "some next" Calibre version? The root cause, I believe, my DOCX Input is the only external InputFormatPlugin and I'm facing a lot of pioneering problems. And the last question. Is it possible to use JSON config for PluginWidget? Currently all those widgets use OptionRecommendation. Regards. ![]() |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,144
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
IIRC there's no way to do that, can you open a bug report for it and I'll look into adding that when I have some time.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Plugin developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 108
Karma: 24394
Join Date: Feb 2012
Location: Lithuania
Device: Kindle
|
|
![]() |
![]() |
![]() |
Tags |
docx, inputformatplugin, pluginwidget |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Plugin ideas... add yours here | kiwidude | Plugins | 1948 | 04-29-2025 10:06 PM |
Using external application (or library) as calibre plugin | janzamyslny | Plugins | 1 | 04-28-2012 10:45 AM |
How do I add a Table view in my plugin? | katsu | Development | 3 | 10-24-2011 12:05 PM |
Can Calibre's conversion modules be used in an external console application? | stodge | Calibre | 6 | 03-23-2011 08:23 PM |
Plugin for external converters | jjje555 | Plugins | 2 | 12-20-2009 12:27 PM |