structure id fix

This commit is contained in:
Luka Kavčič 2020-09-03 11:28:57 +02:00
parent 197cc6199c
commit 4812c18a1d

View File

@ -26,7 +26,7 @@ def build_structure_conversions():
vto_structure = line[1].strip().split(">")[1].split("<")[0] vto_structure = line[1].strip().split(">")[1].split("<")[0]
vto_name = line[2].strip() vto_name = line[2].strip()
vto_id = line[4].strip() vto_id = line[6].strip()
if 0 in (len(vto_name), len(vto_id)): if 0 in (len(vto_name), len(vto_id)):
continue continue
@ -41,16 +41,16 @@ def convert_structure(structure, type):
for vfrom, vto_name, vto_structure, vto_id in structure_conversions: for vfrom, vto_name, vto_structure, vto_id in structure_conversions:
match = structure.match(vfrom) match = structure.match(vfrom)
# fix for ids 65, 66, 67 which instead matched with 64 # fix for ids 106, 107, 44 which instead matched with 30
if match and vto_id == '64' and '-s' in type: if match and vto_id == '30' and '-s' in type:
vto_name = 's0-vp-s0' vto_name = 's0-vp-s0'
vto_id = '65' vto_id = '106'
elif match and vto_id == '64' and '-g' in type: elif match and vto_id == '30' and '-g' in type:
vto_name = 'gg-vp-gg' vto_name = 'gg-vp-gg'
vto_id = '66' vto_id = '107'
elif match and vto_id == '64' and '-r' in type: elif match and vto_id == '30' and '-r' in type:
vto_name = 'r-vp-r' vto_name = 'r-vp-r'
vto_id = '67' vto_id = '44'
if match: if match:
# we need to remove replace alias here as we want to use javascript's one # we need to remove replace alias here as we want to use javascript's one