diff --git a/parsers/caves.py b/parsers/caves.py index 34a2301..70f92cb 100644 --- a/parsers/caves.py +++ b/parsers/caves.py @@ -174,8 +174,8 @@ def do_ARGE_cave(slug, caveid, url, areacode, svxid): cave = Cave( underground_description="ARGE cave.", - survex_file= f"{svxid}.svx", - url=url, + survex_file= f"{svxid}.svx", # or is this svxurl ?! + # url=url, No, the url spplied is that of the survexfile not of the cave file, e.g. /1626/254/254 notes=default_note, areacode=areacode, ) diff --git a/parsers/survex.py b/parsers/survex.py index 96b2e4a..1493a22 100644 --- a/parsers/survex.py +++ b/parsers/survex.py @@ -1195,7 +1195,7 @@ class LoadingSurvex: area = path_match.group(1) caveid = path_match.group(2) sluggy = f"{area}-{caveid}" - seek = [sluggy, sluggy.replace("1623-","")] # to catch '2023-kt-02' etc + seek = [sluggy, sluggy.replace("1623-","")] # to catch '2023-kt-02' etc . 3-digit searches only work for 1623 area for s in seek: if s in self.caveslist: self.caveslist[cavepath] = self.caveslist[s] # set "caves-1626/107/107" as index to cave 1626-107 diff --git a/templates/caveindex.html b/templates/caveindex.html index adb42be..bb69585 100644 --- a/templates/caveindex.html +++ b/templates/caveindex.html @@ -11,7 +11,7 @@ <h3>Notable caves</h3> <ul> {% for cave in notablecaves %} - <li> {{ cave.url|slice:":4" }} <a href="{{ cave.url }}"> + <li> {{ cave.areacode }} <a href="{{ cave.url }}"> {% if cave.kataster_number %} {{ cave.kataster_number }} {{cave.official_name|safe}}</a> {% if cave.unofficial_number %} @@ -19,7 +19,7 @@ {% endif %} {% else %} {{cave.unofficial_number }} {{cave.official_name|safe}}</a> - {% endif %}</td></tr> + {% endif %} {% endfor %} </ul> @@ -29,7 +29,6 @@ <div style="column-count: 3;"> <table class="searchable"> {% for cave in caves1623 %} - <tr><td> <a href="{{ cave.url }}"> {% if cave.kataster_number %} {{ cave.kataster_number }} {{cave.official_name|safe}}</a>