Add support for DTMBA

This commit is contained in:
Ian Renton
2026-08-31 08:59:49 +01:00
parent ba56acd7ac
commit 9083470482
17 changed files with 78 additions and 21 deletions
+7 -1
View File
@@ -3,7 +3,7 @@ from data.band import Band
from data.sig import SIG
# General software
SOFTWARE_VERSION = "2.0.5"
SOFTWARE_VERSION = "2.1-pre"
# HTTP headers used for spot providers that use HTTP
HTTP_HEADERS = {"User-Agent": f"Spothole v{SOFTWARE_VERSION} (operated by {SERVER_OWNER_CALLSIGN})"}
@@ -150,6 +150,12 @@ SIGS = [
description="Diplomas de Municipios Españoles",
ref_regex=r"\d{4,5}",
),
SIG(
name="DTMBA",
comment_names=["DTMBA"],
description="Diploma Teatri Musei e Belle Arti",
ref_regex=r"I-?[0-9]{3,4}\s?[A-Z]{2}",
),
SIG(
name="Toilets",
comment_names=[],
+5
View File
@@ -29,6 +29,11 @@ def get_sig_ref_info(sig, ref_id):
if sig.upper() == "DME":
ref_id = ref_id.zfill(5)
# DTMBA spotters sometimes include spaces and dashes, our regex allows them but they must be removed here so we
# can look up against the official list which doesn't have them
if sig.upper() == "DTMBA":
ref_id = ref_id.replace("-", "").replace(" ", "")
# If the SIG is HEMA, we have no current lookup for this so just skip the lookup here.
if sig.upper() == "HEMA":
sig_ref.ref_type = "Summit"