diff -r 04cc6773cbb0 parsers/survex.py --- a/parsers/survex.py Tue Jul 02 18:13:27 2013 +0100 +++ b/parsers/survex.py Tue Jul 02 20:03:51 2013 +0100 @@ -83,6 +83,8 @@ stardatadefault = { "type":"normal", "t":"leg", "from":0, "to":1, "tape":2, "compass":3, "clino":4 } stardataparamconvert = { "length":"tape", "bearing":"compass", "gradient":"clino" } +#default characters for various items +starsetchars = { "blank":"/t ", "decimal":".", "comment":";", "eol":"/l/n", "keyword":"*", "minus":"-", "names":"_-", "omit":"-", "plus":"+", "root":"/", "separator":"." } def RecursiveLoad(survexblock, survexfile, fin, textlines): iblankbegins = 0 @@ -200,10 +202,14 @@ elif cmd == "fix": survexblock.MakeSurvexStation(line.split()[0]) + elif cmd == "set": + ls = line.lower().split() + # set item to use chars given + starsetchars = { ls[0]:ls[1] } + # what unsets this back to defaults at end of block? else: - assert cmd in [ "sd", "include", "units", "entrance", "data", "flags", "title", "export", "instrument", "calibrate", "set", "infer"], (cmd, line, survexblock) - - + assert cmd in [ "sd", "include", "units", "entrance", "data", "flags", "title", "export", "instrument", "calibrate", "infer"], (cmd, line, survexblock) + def ReloadSurvexCave(survex_cave): cave = models.Cave.objects.get(kataster_number=survex_cave)