2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-14 21:37:13 +00:00

import fixes & statistics table

This commit is contained in:
Philip Sargent
2020-06-12 18:10:07 +01:00
parent b9a223c049
commit 269b8840ad
8 changed files with 182 additions and 65 deletions

View File

@@ -116,6 +116,7 @@ def LoadSurvexEquate(survexblock, sline):
def LoadSurvexLinePassage(survexblock, stardata, sline, comment):
# do not import *data passage.. data which is LRUD not tape/compass/clino
pass
stardatadefault = {"type":"normal", "t":"leg", "from":0, "to":1, "tape":2, "compass":3, "clino":4}
@@ -371,7 +372,7 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
#survexblock.text = "".join(textlines)
# .text not used, using it for number of legs per block
legsinblock = survexlegsnumber - previousnlegs
print("LEGS: {} (previous: {}, now:{})".format(legsinblock,previousnlegs,survexlegsnumber))
print(insp+"LEGS: {} (previous: {}, now:{})".format(legsinblock,previousnlegs,survexlegsnumber))
survexblock.text = str(legsinblock)
survexblock.save()
# print(insp+' - End found: ')
@@ -483,7 +484,7 @@ def LoadAllSurvexBlocks():
#Load all
# this is the first so id=1
survexblockroot = models.SurvexBlock(name="root", survexpath="", begin_char=0, cave=None, survexfile=survexfile, totalleglength=0.0)
survexblockroot = models_survex.SurvexBlock(name="rootblock", survexpath="", begin_char=0, cave=None, survexfile=survexfile, totalleglength=0.0)
survexblockroot.save()
fin = survexfile.OpenFile()
textlines = [ ]