How to get book cover width and height in Calibre Python code?
I am trying to write a template function that gives the width and height of the cover, when there is one. But I do not know the structure of Calibre well enough, and I have be unable to sort out the class definitions to find how to access that information (I am pretty much a beginner with calibre).
For example, I understand (I think) how the template function booksize() works, but I do not see how to do something similar for the cover size.
Is there a map of the main classes used to represent books and metadata?
Alternatively, given that I have a metadata instance MI for an ebook, how can I get in Python the width and height of the cover, as integers www and hhh or as a string 'wwwxhhh'.
|