Quote:
Originally Posted by chris33
It sounds good. I guess I can reuse the code found in function update_metadata
in ../calibre-src/src/calibre/ebooks/oeb/polish/main.py.
It looks like it will do the job.
|
If you haven't already, look at
API documentation for the e-book editing tools.
Quote:
But how can I get the book/container object from the current GUI selection ?
|
First get the book's metadata (mi). For examples of how to do that look at almost any GUI plugin. Examples might be
Embed Comic Metadata and
Manage Series. Once you have the mi you can get the book path from mi.format_metadata[format_name]['path'].
You can also get the format_metadata using db.format_metadata(). You can get the paths using db.format_files().
There are many examples in calibre of using these methods.