Hi Joel,
The code in get_vmod_info.py
(a slight misnomer) is not intended to be omnipotent. That’s why the code in get_vmod_info.py
allows for an external file with overrides (e.g., files_override.json
) to catch cases where the automatic parsing fails. The overrides file is automatically updated with entries when the code cannot parse a version string, and the user can then edit that file (search for unknown
) to specify the correct version.
The file files_meta.json
contains the result of the version and file parsing. To see the converted version strings, do
from json import load
with open('files_meta.json','r') as f:
j = load(f)
v = {f['version']: f['semVersion'] for f in j.values() if 'version' in f}
print(f'| {"From file":20s} {"Parsed":20s} '*2+'|')
print(f'|{"-"*43}'*2+'|\n|',end='',flush=True)
o=0
for i,(r,s) in enumerate(v.items()):
l = f' {r:20s} {s:20s} |'
if o+len(l) > 100:
print('\n|',end='',flush=True)
o = 0
o += len(l)
print(l,end='',flush=True)
Sure there are some problematic conversion, but it is easily fixable by adding entries to files_override.json
. The point is to stage the conversion, so that the code - which cannot ever get it right all the time - can be assisted by a human in a simple and straight forward way
Yours,
Christian