diff --git a/core/models/caves.py b/core/models/caves.py index 72a532b..3193f2b 100644 --- a/core/models/caves.py +++ b/core/models/caves.py @@ -243,7 +243,7 @@ class Entrance(TroggleModel): lat_wgs84 = models.TextField(blank=True, null=True) # manually entered not calculated location_description = models.TextField(blank=True, null=True) long_wgs84 = models.TextField(blank=True, null=True) # manually entered not calculated - map_description = models.TextField(blank=True, null=True) + # map_description = models.TextField(blank=True, null=True) marking = models.CharField(max_length=2, choices=MARKING_CHOICES, default="?") marking_comment = models.TextField(blank=True, null=True) name = models.CharField(max_length=100, blank=True, null=True) diff --git a/parsers/caves.py b/parsers/caves.py index 98a5463..4203368 100644 --- a/parsers/caves.py +++ b/parsers/caves.py @@ -506,7 +506,7 @@ def read_entrance(filename, ent=None): findability = getXMLmax1("findability") findability_description = getXMLmax1("findability_description") location_description = getXMLmax1("location_description") - map_description = getXMLmax1("map_description") + #map_description = getXMLmax1("map_description") marking = getXMLmax1("marking") marking_comment = getXMLmax1("marking_comment") name = getXMLmax1("name") @@ -534,7 +534,7 @@ def read_entrance(filename, ent=None): ent.findability_description=findability_description[0] ent.lastvisit=lastvisit[0] ent.location_description=location_description[0] - ent.map_description=map_description[0] + #ent.map_description=map_description[0] ent.marking=marking[0] ent.marking_comment=marking_comment[0] ent.other_description=other_description[0] @@ -741,7 +741,7 @@ def read_cave(filename, cave=None): references = getXMLmax1("references") survey = getXMLmax1("survey") kataster_status = getXMLmax1("kataster_status") - underground_centre_line = getXMLmax1("underground_centre_line") + #underground_centre_line = getXMLmax1("underground_centre_line") notes = getXMLmax1("notes") length = getXMLmax1("length") depth = getXMLmax1("depth") @@ -798,7 +798,7 @@ def read_cave(filename, cave=None): cave.references=references[0] cave.survey=survey[0] cave.kataster_status=kataster_status[0] - cave.underground_centre_line=underground_centre_line[0] + #cave.underground_centre_line=underground_centre_line[0] cave.notes=notes[0] cave.length=length[0] cave.depth=depth[0] diff --git a/parsers/survex.py b/parsers/survex.py index 3a4d42c..ead5ac8 100644 --- a/parsers/survex.py +++ b/parsers/survex.py @@ -617,7 +617,7 @@ class LoadingSurvex: SO we have to recognise the '*fix' too """ # *fix|36|reference|36359.40|82216.08|2000.00\n - rx_fixline = re.compile(r"(?i)^\s*[*]fix\s+([\w\d_\.\-]+)\s+(?:reference)?\s*([\d\.]*)\s+([\d\.]*)\s+([\d\.]*)\s*;(.*)$") + rx_fixline = re.compile(r"(?i)^\s*[*]fix\s+([\w\d_\.\-]+)\s+(?:reference)?\s*([\d\.]*)\s+([\d\.]*)\s+([\d\.]*)\s*;?(.*)$") line = line.replace("\n","") #fixline = self.rx_fixline.match(line) @@ -646,7 +646,6 @@ class LoadingSurvex: fixid = str(survexblock.id)+ ":"+ name self.fixes[fixid] = (survexblock, name, alt, comment) message = f"{name}, {fixdata=}, last:{fixline.groups()[-1]}" - print(self.insp + message) except Exception as e: print(f'BAD fix comment {e}', file=sys.stderr) print(f'BAD fix comment {name}, {fixdata=}\n{line.replace(" ","|")}\n{survexblock.survexfile.path}:{survexblock}', file=sys.stderr) diff --git a/templates/cave_debug.html b/templates/cave_debug.html index fe6e4cd..0f7364e 100644 --- a/templates/cave_debug.html +++ b/templates/cave_debug.html @@ -8,6 +8,24 @@

Entrances

These are Entrances read from the expoweb/entrance_data/*.html files. These are NOT the *entrance data points in the survex files. + + + + +{% for ent in ents %} +{% if ent.map_description %} + + + + +{% endif %} +{% endfor %} +
entranceent map
+ #{{ent.id}} {{ent}} + + {{ent.map_description}} +
+ diff --git a/templates/dataformat/cave.xml b/templates/dataformat/cave.xml index 64aaf88..cf60e7c 100644 --- a/templates/dataformat/cave.xml +++ b/templates/dataformat/cave.xml @@ -36,7 +36,7 @@ code used in the Austrian kataster e.g '1/S +' - https://expo/.survex.com/katast + erforscht (exploration considered complete) --> {{ cave.kataster_number|default_if_none:""|safe }} -{{ cave.unofficial_number|default_if_none:""|safe }} +{{ cave.unofficial_number|default_if_none:""|safe }} {% for ce in cave.entrances.all %} {{ ce.entrance.slug|default_if_none:""|safe }} @@ -50,7 +50,7 @@ code used in the Austrian kataster e.g '1/S +' - https://expo/.survex.com/katast {{ cave.references|default_if_none:""|safe }} {{ cave.survey|default_if_none:""|safe }} {{ cave.kataster_status|default_if_none:""|safe }} -{{ cave.underground_centre_line|default_if_none:""|safe }} +Blank if not, or notes about status such as 'surveyed, but no entrance fix so not yet in dataset'. --> {{ cave.notes|default_if_none:""|safe }} {{ cave.length|default_if_none:""|safe }} {{ cave.depth|default_if_none:""|safe }} diff --git a/templates/dataformat/entrance.xml b/templates/dataformat/entrance.xml index 7acc740..6e48343 100644 --- a/templates/dataformat/entrance.xml +++ b/templates/dataformat/entrance.xml @@ -23,7 +23,6 @@ though, you do not need to do a data import as it happens automatically --> {{ entrance.name|default_if_none:""|safe }} {{ entrance.entrance_description|default_if_none:""|safe }} {{ entrance.explorers|default_if_none:""|safe }} -{{ entrance.map_description|default_if_none:""|safe }} {{ entrance.location_description|default_if_none:""|safe }} {{ entrance.lastvisit|default_if_none:""|safe }} {{ entrance.approach|default_if_none:""|safe }} @@ -52,7 +51,7 @@ though, you do not need to do a data import as it happens automatically --> {{ entrance.tag_station|default_if_none:""|safe }} {{ entrance.other_station|default_if_none:""|safe }} {{ entrance.other_description|default_if_none:""|safe }} -{{ entrance.bearings|default_if_none:""|safe }} +{{ entrance.bearings|default_if_none:""|safe }} diff --git a/templates/editentrance.html b/templates/editentrance.html index a104ec3..64ee9df 100644 --- a/templates/editentrance.html +++ b/templates/editentrance.html @@ -41,8 +41,10 @@ at troggle/core/forms.py ass this uses a Django magic form creation thinggy. -->
entrance ent slug
Entrance Letter{{ entletter }}
{% endif %} {{ entform }} +{% if ent.bearings %} +{% endif %}
{{ent.bearings|safe}}