You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
590 B
14 lines
590 B
import pickle
|
|
import argparse
|
|
from conversion_utils.jos_msds_and_properties import SpecificationsParser
|
|
|
|
arg_parser = argparse.ArgumentParser(description='Parse source TEI specifications file and save as pickle.')
|
|
arg_parser.add_argument('-xml', type=str, help='input XML file', required=True)
|
|
arg_parser.add_argument('-pickle', type=str, help='output pickle file', required=True)
|
|
arguments = arg_parser.parse_args()
|
|
|
|
parser = SpecificationsParser()
|
|
specifications = parser.parse(arguments.xml)
|
|
with open(arguments.pickle, 'wb') as pickle_file:
|
|
pickle.dump(specifications, pickle_file)
|