From d9dde9439398869b39fd68c5756d89ae4f27d52c Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 28 Jul 2023 13:48:56 +0200 Subject: [PATCH 1/1] Add main thema field. Move to calver. --- setup.py | 2 +- src/librarian/dcparser.py | 5 +++-- src/librarian/meta/types/text.py | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) 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 -- 2.20.1