Quote:
Originally Posted by chaley
Does calibre.ebooks.metadata.opf.set_metadata do what you want?
Also, calibre.db.cache.get_metadata() returns the metadata for a given book id. You can get a db object using gui.library_view.model().db, which gives you access to the methods in db.legacy. You probably want to use gui.library_view.model().db.new_api so you can use the newer methods in db.cache.
|
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.
But how can I get the book/container object from the current GUI selection ?