X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/4e329824f40367945de11d3647396859092f5c2c..a2b90373ee7aa46769fb6faad75bac1ebef3758f:/librarian/dcparser.py diff --git a/librarian/dcparser.py b/librarian/dcparser.py index eeb750a..92afc01 100644 --- a/librarian/dcparser.py +++ b/librarian/dcparser.py @@ -248,7 +248,7 @@ class WorkInfo(six.with_metaclass(DCInfo, object)): Field(DCNS('description'), 'description', required=False), Field(DCNS('source'), 'source_name', required=False), - Field(DCNS('source.URL'), 'source_url', required=False), + Field(DCNS('source.URL'), 'source_urls', salias='source_url', multiple=True, required=False), Field(DCNS('identifier.url'), 'url', WLURI, strict=as_wluri_strict), Field(DCNS('rights.license'), 'license', required=False), Field(DCNS('rights'), 'license_description'), @@ -297,7 +297,7 @@ class WorkInfo(six.with_metaclass(DCInfo, object)): desc = rdf_tag.find(".//" + RDFNS('Description')) if desc is None: - raise NoDublinCore("No DublinCore section found.") + raise NoDublinCore("There must be a '%s' element inside the RDF." % RDFNS('Description')) lang = None p = desc @@ -468,6 +468,8 @@ class BookInfo(WorkInfo): Field(WLNS('coverBarColor'), 'cover_bar_color', required=False), Field(WLNS('coverBoxPosition'), 'cover_box_position', required=False), Field(WLNS('coverClass'), 'cover_class', default=['default']), + Field(WLNS('coverLogoUrl'), 'cover_logo_urls', multiple=True, required=False), + Field('pdf-id', 'isbn_pdf', required=False), Field('epub-id', 'isbn_epub', required=False), Field('mobi-id', 'isbn_mobi', required=False),