summaryrefslogtreecommitdiffstats
path: root/parsers/survex.py
diff options
context:
space:
mode:
authorgoatchurch <goatchurch@ubuntu.clocksoft.dom>2009-09-10 22:07:31 +0100
committergoatchurch <goatchurch@ubuntu.clocksoft.dom>2009-09-10 22:07:31 +0100
commitece3b79e5d5690c96630b598493009b1c924c8f7 (patch)
treec6fd7aa5fca183fb610a6b1007634ff791bba232 /parsers/survex.py
parent8050476c8a853229f1ab23edee929e5ba9515a8e (diff)
downloadtroggle-ece3b79e5d5690c96630b598493009b1c924c8f7.tar.gz
troggle-ece3b79e5d5690c96630b598493009b1c924c8f7.tar.bz2
troggle-ece3b79e5d5690c96630b598493009b1c924c8f7.zip
survey scans features added
Diffstat (limited to 'parsers/survex.py')
-rw-r--r--parsers/survex.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/parsers/survex.py b/parsers/survex.py
index 0a764ef..e9b018d 100644
--- a/parsers/survex.py
+++ b/parsers/survex.py
@@ -68,8 +68,13 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
# detect ref line pointing to the scans directory
mref = comment and re.match('.*?ref.*?(\d+)\s*#\s*(\d+)', comment)
if mref:
- survexblock.refscandir = "%s/%s%%23%s" % (mref.group(1), mref.group(1), mref.group(2))
- survexblock.save()
+ refscan = "%s#%s" % (mref.group(1), mref.group(2))
+ print refscan
+ survexscansfolders = models.SurvexScansFolder.objects.filter(walletname=refscan)
+ if survexscansfolders:
+ survexblock.survexscansfolder = survexscansfolders[0]
+ #survexblock.refscandir = "%s/%s%%23%s" % (mref.group(1), mref.group(1), mref.group(2))
+ survexblock.save()
continue
if not sline:
@@ -128,7 +133,7 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
personexpedition = survexblock.expedition and GetPersonExpeditionNameLookup(survexblock.expedition).get(tm.lower())
if (personexpedition, tm) not in teammembers:
teammembers.append((personexpedition, tm))
- personrole = models.PersonRole(survexblock=survexblock, nrole=mteammember.group(1).lower(), personexpedition=personexpedition, personname=tm)
+ personrole = models.SurvexPersonRole(survexblock=survexblock, nrole=mteammember.group(1).lower(), personexpedition=personexpedition, personname=tm)
if personexpedition:
personrole.person=personexpedition.person
personrole.save()