No plugins are book wide only. If you wish to run it only only the currently opened file, you can do so by simply restricting the files your plugin processes. Get the name of the file like this
from calibre.gui2.tweak_book import editor_name
name = editor_name(self.gui.current_editor)
And I suggest adding a submenu to the plugins menu entry that allows the user to toggle what mnode the plugin operates in.
|