mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 22:37:44 +00:00
Add support for DTMBA
This commit is contained in:
@@ -252,6 +252,9 @@ sig_ref_data_providers:
|
||||
- class: "SANPCPA"
|
||||
enabled: true
|
||||
|
||||
- class: "DTMBA"
|
||||
enabled: true
|
||||
|
||||
- class: "Toilets"
|
||||
enabled: true
|
||||
|
||||
|
||||
+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"
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
from time import sleep
|
||||
|
||||
from data.sig_ref import SIGRef
|
||||
from providers.sigrefdata.file_download_sig_ref_data_provider import FileDownloadSIGRefDataProvider
|
||||
|
||||
|
||||
class DTMBA(FileDownloadSIGRefDataProvider):
|
||||
"""SIG ref data provider for Diploma Teatri Musei Belle Arti"""
|
||||
|
||||
POLL_INTERVAL_DAYS = 30
|
||||
SIG = "DTMBA"
|
||||
DATA_URL = "https://www.iu1fig.com/share/iz0eik/dtmba/export.php"
|
||||
|
||||
def __init__(self, provider_config):
|
||||
super().__init__(self.SIG, provider_config, self.DATA_URL, self.POLL_INTERVAL_DAYS)
|
||||
|
||||
def _http_response_to_data(self, http_response):
|
||||
new_data = []
|
||||
for row in http_response.content.decode("utf-8-sig").splitlines():
|
||||
split = row.split(";")
|
||||
ref_id = split[0]
|
||||
ref_name = split[1]
|
||||
new_data.append(
|
||||
SIGRef(
|
||||
sig=self.SIG,
|
||||
id=ref_id,
|
||||
name=ref_name,
|
||||
ref_type="Building"
|
||||
)
|
||||
)
|
||||
|
||||
# Bail out if a stop has been requested, i.e. the program is shutting down - no need to parse the rest of
|
||||
# the data in this case
|
||||
if self._stop_event.is_set():
|
||||
break
|
||||
|
||||
# Very short pause. This will extend the time to handle sig refs by a few seconds but will ensure some time
|
||||
# is available for other threads e.g. the web server.
|
||||
sleep(0.001)
|
||||
|
||||
return new_data
|
||||
@@ -19,7 +19,6 @@ class ParksNPeaks(HTTPSpotProvider):
|
||||
POLL_INTERVAL_SEC = 120
|
||||
SPOTS_URL = "https://www.parksnpeaks.org/api/ALL"
|
||||
SUBMIT_URL = "https://www.parksnpeaks.org/api/SPOT/"
|
||||
SIOTA_LIST_URL = "https://www.silosontheair.com/data/silos.csv"
|
||||
SUBMITTABLE_SIGS = [
|
||||
"POTA",
|
||||
"SOTA",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "spothole"
|
||||
version = "2.0.5"
|
||||
version = "2.1-pre"
|
||||
authors = [
|
||||
{ name = "Ian Renton", email = "ian@ianrenton.com" },
|
||||
]
|
||||
|
||||
@@ -852,6 +852,7 @@ components:
|
||||
- WAB
|
||||
- WAI
|
||||
- DME
|
||||
- DTMBA
|
||||
- Toilets
|
||||
example: POTA
|
||||
|
||||
|
||||
@@ -365,6 +365,7 @@ const SIG_ICONS = {
|
||||
"WAI": "fa-table-cells-large",
|
||||
"DME": "fa-building",
|
||||
"Tiles": "fa-square",
|
||||
"DTMBA": "fa-masks-theater",
|
||||
"Toilets": "fa-toilet"
|
||||
}
|
||||
|
||||
@@ -392,6 +393,7 @@ const SIG_NAMES = {
|
||||
"WAB": "Worked All Britain",
|
||||
"WAI": "Worked All Ireland",
|
||||
"Tiles": "Tiles on the Air",
|
||||
"DTMBA": "Diploma Teatri Musei e Belle Arti",
|
||||
"TOTA": "Toilets on the Air"
|
||||
}
|
||||
|
||||
|
||||
@@ -101,9 +101,9 @@
|
||||
(MOTA), the Amateur Radio Lighthouse Society (ARLHS), International Lighthouse Lightship Weekend (ILLW), Silos
|
||||
on the Air (SIOTA), World Castles Award (WCA), New Zealand on the Air (ZLOTA), Keith Roget Memorial National
|
||||
Parks Award (KRMNPA), South Australia National Parks and Conservation Parks Award (SANPCPA), Wainwrights on the
|
||||
Air (WOTA), Beaches on the Air (BOTA), Lagos y Lagunas On the Air (LLOTA), Towers on the Air (WWTOTA), Tiles on
|
||||
the Air, Worked All Britain (WAB), Worked All Ireland (WAI), el Diploma Municipios de España (DME) and Toilets
|
||||
on the Air (TOTA).</p>
|
||||
Air (WOTA), Beaches on the Air (BOTA), Lagos y Lagunas On the Air (LLOTA), Towers on the Air, Tiles on
|
||||
the Air, Worked All Britain (WAB), Worked All Ireland (WAI), el Diploma Municipios de España (DME), Diploma
|
||||
Teatri Musei e Belle Arti (DTMBA) and Toilets on the Air.</p>
|
||||
<p>As of the time of writing in June 2026, I think Spothole captures essentially all outdoor radio programmes
|
||||
that have a defined reference list, and almost certainly those that have a spotting/alerting API. If you know of
|
||||
one I've missed, please let me know!</p>
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/js/add-spot.js?v=1787991444"></script>
|
||||
<script src="/static/js/add-spot.js?v=1788163190"></script>
|
||||
<script>$(document).ready(function () {
|
||||
$("#nav-link-add-spot").addClass("active");
|
||||
}); <!-- highlight active page in nav --></script>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/js/alerts.js?v=1787991444"></script>
|
||||
<script src="/static/js/alerts.js?v=1788163190"></script>
|
||||
<script>$(document).ready(function () {
|
||||
$("#nav-link-alerts").addClass("active");
|
||||
}); <!-- highlight active page in nav --></script>
|
||||
|
||||
@@ -76,8 +76,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/js/spotsbandsandmap.js?v=1787991444"></script>
|
||||
<script src="/static/js/bands.js?v=1787991444"></script>
|
||||
<script src="/static/js/spotsbandsandmap.js?v=1788163190"></script>
|
||||
<script src="/static/js/bands.js?v=1788163190"></script>
|
||||
<script>$(document).ready(function () {
|
||||
$("#nav-link-bands").addClass("active");
|
||||
}); <!-- highlight active page in nav --></script>
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
{% extends "skeleton.html" %}
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/css/style.css?v=1787991444" type="text/css">
|
||||
<link rel="stylesheet" href="/static/css/style.css?v=1788163190" type="text/css">
|
||||
<link href="/static/vendor/css/bootstrap-5.3.8.min.css" rel="stylesheet">
|
||||
<link href="/static/vendor/css/fontawesome-6.7.2.min.css" rel="stylesheet">
|
||||
<link href="/static/vendor/css/solid-6.7.2.min.css" rel="stylesheet">
|
||||
@@ -15,10 +15,10 @@
|
||||
window.fetchEventSource = fetchEventSource;
|
||||
</script>
|
||||
|
||||
<script src="/static/js/utils.js?v=1787991444"></script>
|
||||
<script src="/static/js/ui-ham.js?v=1787991444"></script>
|
||||
<script src="/static/js/geo.js?v=1787991444"></script>
|
||||
<script src="/static/js/common.js?v=1787991444"></script>
|
||||
<script src="/static/js/utils.js?v=1788163190"></script>
|
||||
<script src="/static/js/ui-ham.js?v=1788163190"></script>
|
||||
<script src="/static/js/geo.js?v=1788163190"></script>
|
||||
<script src="/static/js/common.js?v=1788163190"></script>
|
||||
{% end %}
|
||||
{% block body %}
|
||||
<div class="container">
|
||||
|
||||
@@ -284,7 +284,7 @@
|
||||
</div>
|
||||
|
||||
<script src="/static/vendor/js/chart-4.4.9.umd.min.js"></script>
|
||||
<script src="/static/js/conditions.js?v=1787991444"></script>
|
||||
<script src="/static/js/conditions.js?v=1788163190"></script>
|
||||
<script>$(document).ready(function () {
|
||||
$("#nav-link-conditions").addClass("active");
|
||||
}); <!-- highlight active page in nav --></script>
|
||||
|
||||
+2
-2
@@ -113,8 +113,8 @@
|
||||
const CARTODB_API_KEY = "{{ web_ui_options.get('cartodb_api_key', '') }}";
|
||||
</script>
|
||||
|
||||
<script src="/static/js/spotsbandsandmap.js?v=1787991444"></script>
|
||||
<script src="/static/js/map.js?v=1787991444"></script>
|
||||
<script src="/static/js/spotsbandsandmap.js?v=1788163189"></script>
|
||||
<script src="/static/js/map.js?v=1788163189"></script>
|
||||
<script>$(document).ready(function () {
|
||||
$("#nav-link-map").addClass("active");
|
||||
}); <!-- highlight active page in nav --></script>
|
||||
|
||||
@@ -113,8 +113,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/js/spotsbandsandmap.js?v=1787991444"></script>
|
||||
<script src="/static/js/spots.js?v=1787991444"></script>
|
||||
<script src="/static/js/spotsbandsandmap.js?v=1788163189"></script>
|
||||
<script src="/static/js/spots.js?v=1788163189"></script>
|
||||
<script>$(document).ready(function () {
|
||||
$("#nav-link-spots").addClass("active");
|
||||
}); <!-- highlight active page in nav --></script>
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/status.js?v=1787991444"></script>
|
||||
<script src="/static/js/status.js?v=1788163190"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("#nav-link-status").addClass("active");
|
||||
|
||||
Reference in New Issue
Block a user