From: Radek Czajka Date: Wed, 10 Apr 2024 11:00:30 +0000 (+0200) Subject: Fixes. X-Git-Tag: 24.4~2 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/b13f09caed970090efa8a6c7205d71cc82ff6c97?ds=inline Fixes. --- 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']