Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions generate_dictionaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def write_map_file(filename, schema_dictionary):
required=False)
parser.add_argument('-c', '--config', help="config file for specific user options", required=False)

parser.add_argument('-o', '--output', help="The folder(s) to write the RDE dictionary files", nargs='+', required=True)
parser.add_argument('-o', '--output', help="The folder to write the RDE dictionary files", nargs=1, required=True)

args = parser.parse_args()

Expand Down Expand Up @@ -123,7 +123,7 @@ def write_map_file(filename, schema_dictionary):
'Size:', len(schema_dictionary.dictionary_byte_array),
'Url:', json.loads(schema_dictionary.json_dictionary)['schema_url'])

dir_to_save = args.output[i]
dir_to_save = args.output

if not os.path.exists(dir_to_save):
os.makedirs(dir_to_save)
Expand Down Expand Up @@ -157,7 +157,7 @@ def write_map_file(filename, schema_dictionary):
print('Entries:', len(annotation_dictionary.dictionary), 'Size:',
len(annotation_dictionary.dictionary_byte_array))

dir_to_save = args.output[i]
dir_to_save = args.output

with open(dir_to_save + '//' + 'annotation.bin', 'wb') as annotaton_bin:
annotaton_bin.write(bytearray(annotation_dictionary.dictionary_byte_array))
Expand Down