mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
Add support for DTMBA
This commit is contained in:
+7
-1
@@ -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=[],
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user