View Single Post
Old 11-24-2020, 02:53 PM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 47,125
Karma: 169815798
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by ElmoFuntz View Post
So I'm new to Python and the Calibre API (but not programming) and was trying to muddle my way through figuring both out by updating an old plugin for v5. Starting to think just redoing the pieces I need for now might be easier. To do this I was starting at the basics with the stuff at https://manual.calibre-ebook.com/creating_plugins.html but the very basic plugin that should update the publisher to "hello world" is not even working. It shows the plugin loaded but importing a new epub does not add the publisher when there is none in the original metadata or when there is a publisher on the book it loads the one on the epub. Since I'm trying to do a plugin that will be manipulating/adding metadata for m4b files this example looked like a good start. Can anyone give me an idea of why? Does it need to be updated for v5? TIA.
If you check the documentation for the helloworld plugin, you'll find the words:

Quote:
Every time you use calibre to convert a book, the plugin’s run() method will be called and the converted book will have its publisher set to “Hello World”. This is a trivial plugin, lets move on to a more complex example that actually adds a component to the user interface.
I have not tried installing it so I have no idea if it will work when converting an ebook.

Last edited by DNSB; 11-24-2020 at 02:55 PM.
DNSB is offline   Reply With Quote