From 096b1d37920980811dc608ef18c4d31da24da0ee Mon Sep 17 00:00:00 2001 From: Klaus Thoden Date: Mon, 5 Mar 2018 13:16:18 +0100 Subject: [PATCH] Debug information --- prepare_tei.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prepare_tei.py b/prepare_tei.py index f618684..e613b79 100644 --- a/prepare_tei.py +++ b/prepare_tei.py @@ -298,6 +298,7 @@ def main(): xml_cleaned = cleanup_xml(xml_tree) xml_cleaned.write("cleaned.xml", pretty_print=True, xml_declaration=True, encoding="utf-8") + logging.info("Wrote cleanup.xml") # first some modifications on a string object xml_string = etree.tostring(xml_cleaned).decode('utf-8') @@ -308,9 +309,10 @@ def main(): mod_string2 = convert_figures(mod_string) - debug_output = teifile.replace(".xml", "-modified.xml") + debug_output = args.teifile.replace(".xml", "-modified.xml") with open(debug_output, "w") as debugfile: debugfile.write(mod_string2) + logging.info("Wrote %s." % debug_output) # check for wellformedness, read again as xml xml_tree2 = etree.fromstring(mod_string2)