View Single Post
Old 10-04-2014, 10:00 AM   #6
stanking
Noob Developer
stanking ought to be getting tired of karma fortunes by now.stanking ought to be getting tired of karma fortunes by now.stanking ought to be getting tired of karma fortunes by now.stanking ought to be getting tired of karma fortunes by now.stanking ought to be getting tired of karma fortunes by now.stanking ought to be getting tired of karma fortunes by now.stanking ought to be getting tired of karma fortunes by now.stanking ought to be getting tired of karma fortunes by now.stanking ought to be getting tired of karma fortunes by now.stanking ought to be getting tired of karma fortunes by now.stanking ought to be getting tired of karma fortunes by now.
 
stanking's Avatar
 
Posts: 25
Karma: 219932
Join Date: Aug 2014
Location: Texas
Device: Amazon Fire 7
Quote:
Originally Posted by kovidgoyal View Post
self.gui.iactions is a mapping of plugin name to plugin object(for all user interface action plugins). So if you want a list

list(self.gui.iactions)

And if you want to iterate over all types of plugins, then use the functions in calibre.customize.ui
Can't get more authoritative than that. Thanks, Kovid! (Dude, he actually talked to me!!!)
Quote:
Originally Posted by davidfor View Post
But, I think you will still have to work with a known list of plugins. The real problem is going to be knowing what they do and if they have any function that can be called externally. I know Reading List does and I remember JimmXinu working with kiwidude to change the interface so he could call it. It has options to suppress error message boxes and throw exceptions instead.
Yeah, you're right, but it will be helpful to pull the user's installed list, and unless I want to modify my code every time a new candidate comes along, I have to provide the user a way to use a new plugin if it works.
There's all kinds of speed bumps to an idea like this. Getting buy-in from other developers to provide hooks and suppress the message boxes would be key. Even then, I don't see launching this without huge danger signs attached, but if you do the same 4 things to each book or group of books you import, it would be nice to automate the process.
stanking is offline   Reply With Quote