Skip to content

Commit

Permalink
add support for output file argument in compile script
Browse files Browse the repository at this point in the history
  • Loading branch information
Phaqui committed Sep 13, 2024
1 parent d8820fe commit 5c8bb91
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/xlsx2xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def read_column_names(columns):
def parse_args():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("inputfile")
parser.add_argument("outputfile", type=Path)

return parser.parse_args()

Expand All @@ -164,9 +165,9 @@ def main(args):

lemmas[(e.WORD, e.WORD_CLASS_SAAMI, e.G3_NomAg)].append(e)


args.outputfile.parent.mkdir(exist_ok=True)
xml_bytestring = dict2xml_bytestring(lemmas)
with open(f"sme-spa.xml", "wb") as f:
with open(args.outputfile, "wb") as f:
f.write(xml_bytestring)


Expand Down

0 comments on commit 5c8bb91

Please sign in to comment.