diff --git a/prepare_tei.py b/prepare_tei.py index e613b79..a7e5a74 100644 --- a/prepare_tei.py +++ b/prepare_tei.py @@ -283,8 +283,8 @@ def main(): parser = argparse.ArgumentParser() parser.add_argument("teifile", help="Output from oxgarage/metypeset, an TEI XML file.") - parser-add_argument("bibfile", help="The bibliography database of the publication.") - parser-add_argument("figdir", help="The directory that contains the figures belonging to the publication.") + parser.add_argument("bibfile", help="The bibliography database of the publication.") + parser.add_argument("figdir", help="The directory that contains the figures belonging to the publication.") args = parser.parse_args() with open(args.teifile, 'r') as xmlfile: @@ -357,7 +357,7 @@ def main(): fix_document_structure(xml_tree2) # output - output = teifile.replace(".xml", "-out.xml") + output = args.teifile.replace(".xml", "-out.xml") tree = etree.ElementTree(xml_tree2) tree.write(output, pretty_print=True, xml_declaration=True,encoding="utf-8") logging.info("Wrote %s." % output)