Skip to content

Commit

Permalink
argparse arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Klaus Thoden committed Mar 5, 2018
1 parent 096b1d3 commit 7497feb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions prepare_tei.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 7497feb

Please sign in to comment.