From 8448c5e8cd4e752db579f6047cc022ac566118d2 Mon Sep 17 00:00:00 2001 From: Klaus Thoden Date: Mon, 5 Mar 2018 13:17:21 +0100 Subject: [PATCH] remove also background color information --- prepare_tei.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prepare_tei.py b/prepare_tei.py index a7e5a74..3e9d7e5 100644 --- a/prepare_tei.py +++ b/prepare_tei.py @@ -192,7 +192,7 @@ def cleanup_xml(xml_tree): # and, rename elements according to our schema metypeset_attrib = xml_tree.findall("//t:*[@meTypesetSize]", namespaces=NS_MAP) - color_attrib = xml_tree.xpath("//t:hi[contains(@rend, 'color')]", namespaces=NS_MAP) + color_attrib = xml_tree.xpath("//t:hi[contains(@rend, 'color') or contains(@rend, 'background')]", namespaces=NS_MAP) logging.info("Found %s metypesets." % len(metypeset_attrib)) logging.info("Found %s colour attributes." % len(color_attrib))