Fit the guide change to the catalogue: Siskiyou Peaks guide, Circle of Solitude sources, and honest no-GPX wording
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
1601f7c755
commit
978514a43e
7 files changed
+67
-13
No files matched your search
@@ -292,6 +292,11 @@ def gpx_status_text(rec):
|
||||
status = gpx(rec)
|
||||
if status == "sold" and not common.sells_gpx(rec):
|
||||
return "Not here, sold as a guide"
|
||||
if status == "elsewhere":
|
||||
# What the page really offers is read from the same link the page's button uses.
|
||||
from . import trail
|
||||
return {"guide": "Not here, see the guide", "": "Not here"}.get(trail.see_kind(rec),
|
||||
GPX_STATUS[status])
|
||||
return GPX_STATUS[status]
|
||||
|
||||
|
||||
|
||||
@@ -196,6 +196,15 @@ def sold_guide_page(rec, url):
|
||||
GUIDE_LABELS = set(LINK_IS_TEXT.values()) | {"The guide's page", "The route's guide"}
|
||||
|
||||
|
||||
def see_kind(rec):
|
||||
"""What a page with no GPX here sends the reader to: "guide" when its link is a guide's,
|
||||
"" when it has no link at all, else "official"."""
|
||||
link = official_link(rec)
|
||||
if not link:
|
||||
return ""
|
||||
return "guide" if link[1] in GUIDE_LABELS else "official"
|
||||
|
||||
|
||||
def _see_clause(rec):
|
||||
"""", so see the official site", or ", so see the guide" when the page on offer is a guide's."""
|
||||
link = official_link(rec)
|
||||
|
||||
Reference in new issue
Block a user