epub-rs icon indicating copy to clipboard operation
epub-rs copied to clipboard

Reading metadata attributes

Open beedaddy opened this issue 4 years ago • 2 comments

Sorry if this is not the right place to ask. I would like to read some attributes like file-as from the creator element: <dc:creator xmlns:ns0="http://www.idpf.org/2007/opf" ns0:role="aut" ns0:file-as="Deaver, Jeffery">Jeffery Deaver</dc:creator>. Is this somehow possible?

beedaddy avatar Jan 28 '21 06:01 beedaddy

Right now the metadata is parsed here and we just get the tag and the text value, the metadata is a HashMap<String, Vec<String>>.

With the current version, the only way to get that information is to parse again the root file xml. Maybe it's interesting to store all attrs information during the root parse or just create a complex struct to store metadata with more than string values.

danigm avatar Jan 28 '21 07:01 danigm

It would be really helpful. Perhaps you could handle this as a feature request.

beedaddy avatar Jan 28 '21 07:01 beedaddy