Assume dc:creator without a role is an author when reading opf files.

This commit is contained in:
Kovid Goyal 2007-11-11 20:21:01 +00:00
parent 9c214536b7
commit 8e62e77168

View File

@ -130,6 +130,8 @@ class OPFReader(MetaInformation):
role = elem.get('role') role = elem.get('role')
if not role: if not role:
role = elem.get('opf:role') role = elem.get('opf:role')
if not role:
role = 'aut'
if role == 'aut': if role == 'aut':
raw = self.ENTITY_PATTERN.sub(entity_to_unicode, elem.string) raw = self.ENTITY_PATTERN.sub(entity_to_unicode, elem.string)
au = raw.split(',') au = raw.split(',')