Replaced JOS XML specifications with preprocessed pickle
This commit is contained in:
13
scripts/install_jos_specifications.py
Normal file
13
scripts/install_jos_specifications.py
Normal file
@@ -0,0 +1,13 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user