From b13f09caed970090efa8a6c7205d71cc82ff6c97 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 10 Apr 2024 13:00:30 +0200 Subject: [PATCH] Fixes. --- src/librarian/html.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/librarian/html.py b/src/librarian/html.py index c2f41c0..2919498 100644 --- a/src/librarian/html.py +++ b/src/librarian/html.py @@ -39,7 +39,7 @@ def transform_abstrakt(abstrakt_element): style = etree.parse(style_filename) xml = etree.tostring(abstrakt_element, encoding='unicode') document = etree.parse(io.StringIO( - xml.replace('abstrakt', 'dlugi_cytat') + xml.replace('', '', @@ -49,6 +49,10 @@ def transform_abstrakt(abstrakt_element): def add_image_sizes(tree, gallery_path, gallery_url, base_url): widths = [360, 600, 1200, 1800, 2400] + try: + os.makedirs(gallery_path) + except: + pass for i, ilustr in enumerate(tree.findall('//ilustr')): rel_path = ilustr.attrib['src'] -- 2.20.1