Hmmmm...I don't now about reading the PML text for Metadata. I suppose you could read just the first text section since it's always in the first few lines, but that would take a lot of extra coding.
You can get the title by just sucking down the first 24 bytes of the file itself (the header of the PDB wrapper) and be happy with that. As a bonus, that works for both DRM and nonDRM files. Unless the person is using some sort of homebrew eReader creator, it's nearly a guarantee that if the metadata was specified within the /v blocks, then it will be loaded in the MetaInfo section.
I'm setting up my Calibre development environment (bzr is chugging along). I'm going to add a few print statements and see what's going on with my file within the "get_metadata" function of ereader.py.
- Jim
|