View Single Post
Old 03-09-2012, 10:26 AM   #188
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@Gary - adding a button to the edit metadata screen isn't possible without changing the source code of calibre. GUI plugins can only be hooked into the main library context menu or one of the various toolbars, there is no way of adding buttons anywhere else. To do what you have asked for would at the very least require hard-coding calibre to detect the presence of this plugin and change buttons accordingly and probably more likely for the plugin to actually be bundled with calibre.

If you run calibre from source and roll your sleeves up I am sure you could do something but as I say it would need Kovid's thoughts/blessing for it to be anything other than a local patch for you.

As for your second question, it is a bit of a pandoras box I have avoided opening . I understand what you are asking for and it has crossed my mind in the past,. To do the job "properly" the plugin would need a rules engine, probably not dissimlar in some ways to what is done with custom colouring by chaley. So you would be able to say if book has this tag and/or custom column value then use this cover, etc. And you have to cater for what happens if you have conflicts (two cover rules apply for the same book). It is a *lot* of work and since the % of time I have need for custom covers is small for the books I personally keep I just lack the motivation to spend x days writing it.
kiwidude is offline   Reply With Quote