diff options
Diffstat (limited to 'parsers/drawings.py')
-rw-r--r-- | parsers/drawings.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/parsers/drawings.py b/parsers/drawings.py index 2f4e4a9..a6c16be 100644 --- a/parsers/drawings.py +++ b/parsers/drawings.py @@ -128,15 +128,19 @@ def settherionfileinfo(filetuple): # scrap blownout -projection plan -scale [-81.0 -42.0 216.0 -42.0 0.0 0.0 7.5438 0.0 m] for xth_me in rx_xth_me.findall(ttext): + # WORK IN PROGRESS. Do not clutter up the DataIssues list with this message = f'! Un-parsed image filename: {therionfile.dwgname} : {xth_me.split()[-3]} - {therionfile.dwgpath}' - #print(message) - DataIssue.objects.create(parser='xTherion', message=message, url=f'/dwgdataraw/{therionfile.dwgpath}') + # print(message) + # DataIssue.objects.create(parser='xTherion', message=message, url=f'/dwgdataraw/{therionfile.dwgpath}') + with open('therionrefs.log', 'a') as lg: + lg.write(message + '\n') + findimageinsert(therionfile, xth_me) for inp in rx_input.findall(ttext): # if this 'input' is a .th2 file we have already seen, then we can assign this as a sub-file # but we would need to disentangle to get the current path properly - message = f'! Un-set Therion .th2 input: - {therionfile.dwgname} : {inp} - {therionfile.dwgpath}' + message = f'! Un-set (?) Therion .th2 input: - {therionfile.dwgname} : {inp} - {therionfile.dwgpath}' #print(message) DataIssue.objects.create(parser='xTherion', message=message, url=f'/dwgdataraw/{therionfile.dwgpath}') findimportinsert(therionfile, inp) @@ -207,6 +211,9 @@ def load_drawings_files(): DataIssue.objects.filter(parser='Therion').delete() DataIssue.objects.filter(parser='xTherion').delete() DataIssue.objects.filter(parser='Tunnel').delete() + if(os.path.isfile('therionrefs.log')): + os.remove('therionrefs.log') + drawingsdirs = [ "" ] while drawingsdirs: |