View Single Post
Old 07-25-2014, 11:30 PM   #63
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,996
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
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.
kovidgoyal is offline   Reply With Quote