View Single Post
Old 12-14-2015, 08:38 AM   #1
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
Suggestion: Plugin API exposing basic metadata

The plugin developer might want/need to access a couple of basic ebook metadata, like dc:identifier or dc:language.

At the moment, she must call bk.get_opf() and parse the resulting blob.

Although the above requires half a dozen lines of code (if you know lxml and xpath), I am quite sure that this a common situation to the extent that a future version of the Plugin APIs might want to include a call, say get_meta(), to get, say, a Python dict() with the metadata from the current OPF.
AlPe is offline   Reply With Quote