From 4c7aa984d23e14f70460a61bdeec8dc015e4e147 Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 8 Feb 2019 16:16:37 +0100 Subject: [PATCH] If caption is missing, convert to figurenonumber Signed-off-by: kthoden --- fix_tei.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fix_tei.py b/fix_tei.py index 7003999..963da3f 100644 --- a/fix_tei.py +++ b/fix_tei.py @@ -302,7 +302,10 @@ def make_figure_elements(list_of_figures, figure_directory): parent_tag.append(yenda_command) else: - logging.info("The figure string could not be split by '!': %s" % etree.tostring(graphic)) + logging.info(f"The figure string could not be split by '!'. Adding graphic without caption.") + graphic.set("scale", "50") + graphic.set("url", figure_directory + os.path.sep + parts[0]) + parent_tag.set("n", "nonumber") return bad_images # def make_figure_elements ends here