Provide links for SIG refs

This commit is contained in:
Ian Renton
2025-10-17 12:22:16 +01:00
parent ec4291340a
commit 760077b081
10 changed files with 50 additions and 15 deletions

View File

@@ -36,6 +36,7 @@ class GMA(HTTPSpotProvider):
comment=source_spot["TEXT"],
sig_refs=[source_spot["REF"]],
sig_refs_names=[source_spot["NAME"]],
sig_refs_urls=["https://www.cqgma.org/zinfo.php?ref=" + source_spot["REF"]],
time=datetime.strptime(source_spot["DATE"] + source_spot["TIME"], "%Y%m%d%H%M").replace(
tzinfo=pytz.UTC).timestamp(),
dx_latitude=float(source_spot["LAT"]) if (source_spot["LAT"] and source_spot["LAT"] != "") else None,

View File

@@ -29,6 +29,7 @@ class POTA(HTTPSpotProvider):
sig="POTA",
sig_refs=[source_spot["reference"]],
sig_refs_names=[source_spot["name"]],
sig_refs_urls=["https://pota.app/#/park/" + source_spot["reference"]],
icon="tree",
time=datetime.strptime(source_spot["spotTime"], "%Y-%m-%dT%H:%M:%S").replace(tzinfo=pytz.UTC).timestamp(),
dx_grid=source_spot["grid6"],

View File

@@ -50,6 +50,7 @@ class SOTA(HTTPSpotProvider):
sig="SOTA",
sig_refs=[source_spot["summitCode"]],
sig_refs_names=[source_spot["summitName"]],
sig_refs_urls=["https://www.sotadata.org.uk/en/summit/" + source_spot["summitCode"]],
icon="mountain-sun",
time=datetime.fromisoformat(source_spot["timeStamp"]).timestamp(),
activation_score=source_spot["points"])

View File

@@ -18,9 +18,16 @@ class WWBOTA(SSESpotProvider):
# n-fer activations.
refs = []
ref_names = []
ref_urls = []
for ref in source_spot["references"]:
refs.append(ref["reference"])
ref_names.append(ref["name"])
# Bunkerbase URLs only work for UK bunkers, so only add a URL if we have a B/G prefix. In theory this could
# lead to array alignment mismatches if there was e.g. a B/F bunker followed by a B/G one, we'd end up with
# the B/G URL in index 0. But in practice there are no overlaps between B/G bunkers and any others, so an
# activation will either be entirely B/G or not B/G at all.
if ref["reference"].startswith("B/G"):
ref_urls.append("https://bunkerwiki.org/?s=" + ref["reference"])
spot = Spot(source=self.name,
dx_call=source_spot["call"].upper(),

View File

@@ -29,6 +29,7 @@ class WWFF(HTTPSpotProvider):
sig="WWFF",
sig_refs=[source_spot["reference"]],
sig_refs_names=[source_spot["reference_name"]],
sig_refs_urls=["https://wwff.co/directory/?showRef=" + source_spot["reference"]],
icon="seedling",
time=datetime.fromtimestamp(source_spot["spot_time"], tz=pytz.UTC).timestamp(),
dx_latitude=source_spot["latitude"],