From 1fc6730667e7018f363771ab01584ffa716812de Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 12 May 2022 11:41:00 +0200 Subject: [PATCH 1/1] 2.4.1 --- CHANGELOG.md | 11 +++++++++++ setup.py | 2 +- src/librarian/dcparser.py | 1 + src/librarian/parser.py | 5 ++++- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13da76c..9dbf4af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ This document records all notable changes to Librarian. + +## 2.4.1 (22-05-12) + +### Added +- `category.legimi` metadata field + +### Changed +- Fix PDF support for 'Geometric shapes' characters. +- Explicitly ignore unknown elements in v2 elements API. + + ## 2.4 (2022-05-06) ### Added diff --git a/setup.py b/setup.py index 7bb2477..637f20d 100755 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ def whole_tree(prefix, path): setup( name='librarian', - version='2.4', + version='2.4.1', 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 1976850..549142b 100644 --- a/src/librarian/dcparser.py +++ b/src/librarian/dcparser.py @@ -509,6 +509,7 @@ class BookInfo(WorkInfo): required=False), Field(DCNS('subject.genre'), 'genres', salias='genre', multiple=True, required=False), + Field(WLNS('category.legimi'), 'legimi', required=False), Field(DCNS('subject.location'), 'location', required=False), diff --git a/src/librarian/parser.py b/src/librarian/parser.py index c00785a..5e2fb08 100644 --- a/src/librarian/parser.py +++ b/src/librarian/parser.py @@ -30,7 +30,10 @@ class WLElementLookup(etree.CustomElementClassLookup): return if namespace: return - return WL_ELEMENTS[name] + try: + return WL_ELEMENTS[name] + except KeyError: + return parser = etree.XMLParser() -- 2.20.1