diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2022-07-21 19:01:04 +0300 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2022-07-21 19:01:04 +0300 |
commit | 931c33cfdb498deaca00b4293f4290e5edb6a8a6 (patch) | |
tree | c852e55663b14ca7cf019c2dc4389e4092b1f410 /parsers/drawings.py | |
parent | f895a7e44c17cf22b239145372303f110bba3571 (diff) | |
download | troggle-931c33cfdb498deaca00b4293f4290e5edb6a8a6.tar.gz troggle-931c33cfdb498deaca00b4293f4290e5edb6a8a6.tar.bz2 troggle-931c33cfdb498deaca00b4293f4290e5edb6a8a6.zip |
Clean DataIssues output, new therionrefs.log file
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: |