From: Radek Czajka Date: Fri, 28 Jul 2023 11:48:56 +0000 (+0200) Subject: Add main thema field. Move to calver. X-Git-Tag: 23.07 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/d9dde9439398869b39fd68c5756d89ae4f27d52c Add main thema field. Move to calver. --- diff --git a/setup.py b/setup.py index 0b8c47a..9c8120c 100755 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ def whole_tree(prefix, path): setup( name='librarian', - version='2.6.1', + version='23.07', description='Converter from WolneLektury.pl XML-based language to XHTML, TXT and other formats', author="Marek Stępniowski", author_email='marek@stepniowski.com', diff --git a/src/librarian/dcparser.py b/src/librarian/dcparser.py index 1d3c2f3..34723f2 100644 --- a/src/librarian/dcparser.py +++ b/src/librarian/dcparser.py @@ -361,8 +361,9 @@ class BookInfo(WorkInfo): required=False), Field(DCNS('subject.genre'), 'genres', text.Genre, salias='genre', multiple=True, required=False), - Field(WLNS('category.legimi'), 'legimi', text.LegimiCategory, required=False), - Field(WLNS('category.thema'), 'thema', text.ThemaCategory, required=False, multiple=True), + Field('category.legimi', 'legimi', text.LegimiCategory, required=False), + Field('category.thema.main', 'thema_main', text.ThemaCategory, required=False), + Field('category.thema', 'thema', text.MainThemaCategory, required=False, multiple=True), Field(DCNS('subject.location'), 'location', required=False), Field(DCNS('contributor.translator'), 'translators', diff --git a/src/librarian/meta/types/text.py b/src/librarian/meta/types/text.py index 8010ec1..55e8261 100644 --- a/src/librarian/meta/types/text.py +++ b/src/librarian/meta/types/text.py @@ -25,6 +25,9 @@ class LegimiCategory(NameIdentifier): class ThemaCategory(NameIdentifier): pass +class MainThemaCategory(ThemaCategory): + pass + class Epoch(NameIdentifier): pass