mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Start work on plugin framework for editor
This commit is contained in:
parent
4b88420482
commit
feec1eb77d
@ -741,3 +741,8 @@ class ViewerPlugin(Plugin): # {{{
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
class EditBookToolPlugin(Plugin): # {{{
|
||||||
|
pass
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ from calibre.customize import (CatalogPlugin, FileTypePlugin, PluginNotFound,
|
|||||||
MetadataReaderPlugin, MetadataWriterPlugin,
|
MetadataReaderPlugin, MetadataWriterPlugin,
|
||||||
InterfaceActionBase as InterfaceAction,
|
InterfaceActionBase as InterfaceAction,
|
||||||
PreferencesPlugin, platform, InvalidPlugin,
|
PreferencesPlugin, platform, InvalidPlugin,
|
||||||
StoreBase as Store, ViewerPlugin)
|
StoreBase as Store, ViewerPlugin, EditBookToolPlugin)
|
||||||
from calibre.customize.conversion import InputFormatPlugin, OutputFormatPlugin
|
from calibre.customize.conversion import InputFormatPlugin, OutputFormatPlugin
|
||||||
from calibre.customize.zipplugin import loader
|
from calibre.customize.zipplugin import loader
|
||||||
from calibre.customize.profiles import InputProfile, OutputProfile
|
from calibre.customize.profiles import InputProfile, OutputProfile
|
||||||
@ -527,6 +527,13 @@ def all_viewer_plugins():
|
|||||||
yield plugin
|
yield plugin
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
# Editor plugins {{{
|
||||||
|
def all_edit_book_tool_plugins():
|
||||||
|
for plugin in _initialized_plugins:
|
||||||
|
if isinstance(plugin, EditBookToolPlugin):
|
||||||
|
yield plugin
|
||||||
|
# }}}
|
||||||
|
|
||||||
# Initialize plugins {{{
|
# Initialize plugins {{{
|
||||||
|
|
||||||
_initialized_plugins = []
|
_initialized_plugins = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user