GMA Islands support

This commit is contained in:
Ian Renton
2026-08-22 08:02:57 +01:00
parent a27a04b65d
commit 1fd6611ac2
11 changed files with 38 additions and 15 deletions
+6
View File
@@ -53,6 +53,12 @@ SIGS = [
description="Islands on the Air",
ref_regex=r"[A-Z]{2}\-\d{3}",
),
SIG(
name="GMA Island",
comment_names=[],
description="Global Mountain Activity - Islands",
ref_regex=r"(([A-Z]{2}\-\d{3})|([A-Z0-9]{1,3}\/[A-Z]{2}\-\d{3}))",
),
SIG(
name="MOTA",
comment_names=["MOTA"],
+14
View File
@@ -73,6 +73,20 @@ def get_sig_ref_info(sig, ref_id):
sig_ref.url = f"https://www.beachesontheair.com/beaches/{sig_ref.name.lower().replace(' ', '-')}"
return sig_ref
elif sig.upper() == "GMA Islands":
# GMA Islands is a bit of a mess of GMA and IOTA references. Try looking them both up and see what returns
# the best result.
iota_lookup = get_sig_ref_info("IOTA", ref_id)
gma_lookup = get_sig_ref_info("GMA", ref_id)
for key, value in iota_lookup.__dict__.items():
if value is not None and sig_ref.__dict__.get(key) is None:
sig_ref.__dict__[key] = value
for key, value in gma_lookup.__dict__.items():
if value is not None and sig_ref.__dict__.get(key) is None:
sig_ref.__dict__[key] = value
sig_ref.ref_type = "Island"
return sig_ref
### ACTUAL LOOKUP ###
#
# OK, this is something we have to look up. Now check to see if our data store contains reference data and use