From d2804ef5b9fb9582e3c9298f0b3e2ec3e789f988 Mon Sep 17 00:00:00 2001 From: Klaus Thoden Date: Mon, 5 Mar 2018 16:23:42 +0100 Subject: [PATCH] argparse --- prepare_tei.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prepare_tei.py b/prepare_tei.py index 170ee1f..fccf00c 100644 --- a/prepare_tei.py +++ b/prepare_tei.py @@ -280,7 +280,7 @@ def fix_document_structure(xml_tree): # def fix_document_structure ends here -def fix_tei_header(xml_tree): +def fix_tei_header(xml_tree, bibfile_string): """Populate TEI header with mandatory data""" title_statement = xml_tree.xpath("//t:titleStmt", namespaces=NS_MAP)[0] @@ -296,7 +296,7 @@ def fix_tei_header(xml_tree): # licence_text = etree.SubElement(licence, "p").text = """Distributed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Germany License.""" source_desc = xml_tree.xpath("//t:sourceDesc", namespaces=NS_MAP)[0] - bibfile = etree.SubElement(source_desc, "listBibl", source=str(args.bibfile), type="monograph") + bibfile = etree.SubElement(source_desc, "listBibl", source=bibfile_string, type="monograph") profile_desc = etree.SubElement(xml_tree, "profileDesc") langusage = etree.SubElement(profile_desc, "langUsage")