Merge in Sam's parser debugging

This commit is contained in:
Wookey 2015-04-08 03:27:48 +01:00
commit dc385b52bf
4 changed files with 12 additions and 2 deletions

View File

@ -13,7 +13,8 @@ def readcaves():
print "Reading Entrances"
#print "list of <Slug> <Filename>"
for filename in os.walk(settings.ENTRANCEDESCRIPTIONS).next()[2]: #Should be a better way of getting a list of files
readentrance(filename)
if filename.endswith('.html'):
readentrance(filename)
print "Reading Caves"
for filename in os.walk(settings.CAVEDESCRIPTIONS).next()[2]: #Should be a better way of getting a list of files
readcave(filename)

View File

@ -231,6 +231,9 @@ def ReloadSurvexCave(survex_cave):
def LoadAllSurvexBlocks():
print 'Loading All Survex Blocks...'
models.SurvexBlock.objects.all().delete()
models.SurvexFile.objects.all().delete()
models.SurvexDirectory.objects.all().delete()
@ -265,6 +268,9 @@ def LoadAllSurvexBlocks():
poslineregex = re.compile("^\(\s*([+-]?\d*\.\d*),\s*([+-]?\d*\.\d*),\s*([+-]?\d*\.\d*)\s*\)\s*([^\s]+)$")
def LoadPos():
print 'Loading Pos....'
call([settings.CAVERN, "--output=%s/all.3d" % settings.SURVEX_DATA, "%s/all.svx" % settings.SURVEX_DATA])
call([settings.THREEDTOPOS, '%sall.3d' % settings.SURVEX_DATA], cwd = settings.SURVEX_DATA)
posfile = open("%sall.pos" % settings.SURVEX_DATA)

View File

@ -189,6 +189,9 @@ def LoadListScansFile(survexscansfolder):
# this iterates through the scans directories (either here or on the remote server)
# and builds up the models we can access later
def LoadListScans():
print 'Loading Survey Scans...'
SurvexScanSingle.objects.all().delete()
SurvexScansFolder.objects.all().delete()

View File

@ -38,9 +38,9 @@
<a href="{% url survexcavessingle 161 %}">161</a> |
<a href="{% url survexcavessingle 204 %}">204</a> |
<a href="{% url survexcavessingle 258 %}">258</a> |
<a href="{% url expedition 2011 %}">Expo2011</a> |
<a href="{% url expedition 2012 %}">Expo2012</a> |
<a href="{% url expedition 2013 %}">Expo2013</a> |
<a href="{% url expedition 2014 %}">Expo2014</a> |
<a href="/admin/">Django admin</a>
</div>