Thanks. I'm still unclear on how this works.
https://manual.calibre-ebook.com/db_api.html
Is this the only documentation?
set_metadata requires an "mi" (Metadata object), which I assume is the *full* metadata for the book (because it says that you need to specify None if you don't want a given field replaced). But I don't see where the Metadata object itself is documented, so I'm not sure how to index into it to edit just the user-defined fields.
Similarly, set_field asks for a "mapping of book id's to values". What is that? And what is the "name" of the field if it's a user-defined field?