summaryrefslogtreecommitdiffstats
path: root/parsers/surveys.py
diff options
context:
space:
mode:
Diffstat (limited to 'parsers/surveys.py')
-rw-r--r--parsers/surveys.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/parsers/surveys.py b/parsers/surveys.py
index 30361d4..e0ecf27 100644
--- a/parsers/surveys.py
+++ b/parsers/surveys.py
@@ -130,7 +130,7 @@ def find_tunnel_scan(dwgfile, path):
if len(scansfolderl):
scansfolder = scansfolderl[0]
if len(scansfolderl) > 1:
- message = "! More than one scan FOLDER matches filter query. [{}]: {} {} {} {}".format(scansfilel[0], mscansdir.group(1), mscansdir.group(2), dwgfile.tunnelpath, path)
+ message = "! More than one scan FOLDER matches filter query. [{}]: {} {} {} {}".format(scansfilel[0], mscansdir.group(1), mscansdir.group(2), dwgfile.dwgpath, path)
print(message)
DataIssue.objects.create(parser='Tunnel', message=message)
@@ -138,7 +138,7 @@ def find_tunnel_scan(dwgfile, path):
scansfilel = scansfolder.singlescan_set.filter(name=mscansdir.group(2))
if len(scansfilel):
if len(scansfilel) > 1:
- message = "! More than one image FILENAME matches filter query. [{}]: {} {} {} {}".format(scansfilel[0], mscansdir.group(1), mscansdir.group(2), dwgfile.tunnelpath, path)
+ message = "! More than one image FILENAME matches filter query. [{}]: {} {} {} {}".format(scansfilel[0], mscansdir.group(1), mscansdir.group(2), dwgfile.dwgpath, path)
print(message)
DataIssue.objects.create(parser='Tunnel', message=message)
scansfile = scansfilel[0]
@@ -179,7 +179,7 @@ def settherionfileinfo(filetuple):
'''
thtype, therionfile = filetuple
- ff = os.path.join(settings.TUNNEL_DATA, therionfile.tunnelpath)
+ ff = os.path.join(settings.TUNNEL_DATA, therionfile.dwgpath)
therionfile.filesize = os.stat(ff)[stat.ST_SIZE]
if therionfile.filesize <= 0:
message = "! Zero length therion file {}".format(ff)
@@ -206,7 +206,7 @@ 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):
- message = f'! Un-parsed image filename: {therionfile.tunnelname} : {xth_me.split()[-3]} - {therionfile.tunnelpath}'
+ message = f'! Un-parsed image filename: {therionfile.tunnelname} : {xth_me.split()[-3]} - {therionfile.dwgpath}'
#print(message)
DataIssue.objects.create(parser='Therion', message=message)
findimageinsert(therionfile, xth_me)
@@ -214,7 +214,7 @@ def settherionfileinfo(filetuple):
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.tunnelname} : {inp} - {therionfile.tunnelpath}'
+ message = f'! Un-set Therion .th2 input: - {therionfile.tunnelname} : {inp} - {therionfile.dwgpath}'
#print(message)
DataIssue.objects.create(parser='Therion', message=message)
findimportinsert(therionfile, inp)
@@ -229,7 +229,7 @@ def setdwgfileinfo(dwgfile):
Should try to read the date too e.g. tunneldate="2010-08-16 22:51:57
then we could display on the master calendar per expo.
'''
- ff = os.path.join(settings.TUNNEL_DATA, dwgfile.tunnelpath)
+ ff = os.path.join(settings.TUNNEL_DATA, dwgfile.dwgpath)
dwgfile.filesize = os.stat(ff)[stat.ST_SIZE]
if dwgfile.filesize <= 0:
message = "! Zero length xml file {}".format(ff)
@@ -278,17 +278,17 @@ def load_drawings_files():
drawingsdirs.append(lf) # lunatic! adding to list in middle of list while loop!
elif f[-4:] == ".xml":
# Always creates new
- dwgfile = DrawingFile(tunnelpath=lf, tunnelname=os.path.split(f[:-4])[1])
+ dwgfile = DrawingFile(dwgpath=lf, tunnelname=os.path.split(f[:-4])[1])
dwgfile.save()
all_xml.append(('xml',dwgfile))
elif f[-3:] == ".th":
# Always creates new
- dwgfile = DrawingFile(tunnelpath=lf, tunnelname=os.path.split(f[:-4])[1])
+ dwgfile = DrawingFile(dwgpath=lf, tunnelname=os.path.split(f[:-4])[1])
dwgfile.save()
all_xml.append(('th',dwgfile))
elif f[-4:] == ".th2":
# Always creates new
- dwgfile = DrawingFile(tunnelpath=lf, tunnelname=os.path.split(f[:-4])[1])
+ dwgfile = DrawingFile(dwgpath=lf, tunnelname=os.path.split(f[:-4])[1])
dwgfile.save()
all_xml.append(('th2',dwgfile))