Compare commits

...
13 Commits
Author SHA1 Message Date
Ian Renton c71c0e9d75 Release v2.0.2 2026-08-28 16:10:02 +01:00
Ian Renton f2ef6e93fa Merge remote-tracking branch 'origin/main'
# Conflicts:
#	core/constants.py
#	pyproject.toml
#	templates/add_spot.html
#	templates/alerts.html
#	templates/bands.html
#	templates/base.html
#	templates/conditions.html
#	templates/map.html
#	templates/spots.html
#	templates/status.html
2026-08-28 15:46:24 +01:00
Ian Renton d63897f8ad Provide CartoDB API key 2026-08-28 15:43:52 +01:00
Ian Renton 02e2730e47 v2.0.1 release 2026-08-28 07:59:10 +01:00
Ian Renton b2719d2cd6 Fix a bug where the default maximum spot age was not being applied on first access of the web UI 2026-08-28 07:52:15 +01:00
ian b9268dd4ca Update pyproject.toml 2026-08-25 20:42:07 +00:00
ian 0cce38b0ab Update core/constants.py 2026-08-25 20:41:53 +00:00
ian 5a77248dbc Fix a bug in calling the V1 add spot endpoint 2026-08-25 20:41:12 +00:00
Ian Renton 14e4886c1b v2.0 release 2026-08-22 08:11:03 +01:00
Ian Renton f346444ec3 Defensive coding improvements 2026-08-22 08:08:27 +01:00
Ian Renton 6f21ac83b7 Add timestamp to log output 2026-08-22 08:07:34 +01:00
Ian Renton a20c29cdd1 GMA Islands support 2026-08-22 08:04:24 +01:00
Ian Renton 1fd6611ac2 GMA Islands support 2026-08-22 08:02:57 +01:00
21 changed files with 64 additions and 27 deletions
+3 -1
View File
@@ -345,4 +345,6 @@ web_ui_options:
# (home) page, although being arbitrary HTML you can also use a div with absolute, relative, float placement etc. This
# is designed for a "donate/support the server" type button, though you are free to do whatever you want with it.
# As the server owner you are responsible for the safe usage of this option!
support_button_html: ""
support_button_html: ""
# CartoDB API key. Required to use the CartoDB layers without watermark. Get one from https://carto.com/basemaps/apikey/.
cartodb_api_key: ""
+7 -1
View File
@@ -3,7 +3,7 @@ from data.band import Band
from data.sig import SIG
# General software
SOFTWARE_VERSION = "2.0-pre"
SOFTWARE_VERSION = "2.0.2"
# HTTP headers used for spot providers that use HTTP
HTTP_HEADERS = {"User-Agent": f"Spothole v{SOFTWARE_VERSION} (operated by {SERVER_OWNER_CALLSIGN})"}
@@ -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
+2 -1
View File
@@ -50,7 +50,8 @@ class DXCluster(SpotProvider):
def stop(self):
self._running = False
self._telnet.close()
if self._telnet:
self._telnet.close()
self._thread.join()
def _handle(self):
+3
View File
@@ -117,6 +117,9 @@ class GMA(HTTPSpotProvider):
case "IOTA Island":
spot.sig_refs[0].sig = "IOTA"
spot.sig = "IOTA"
case "GMA Island":
spot.sig_refs[0].sig = "GMA Island"
spot.sig = "GMA Island"
case "Lighthouse (ILLW)":
spot.sig_refs[0].sig = "ILLW"
spot.sig = "ILLW"
+2 -1
View File
@@ -39,7 +39,8 @@ class RBN(SpotProvider):
def stop(self):
self._running = False
self._telnet.close()
if self._telnet:
self._telnet.close()
self._thread.join()
def _handle(self):
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "Spothole"
version = "2.0"
version = "2.0.2"
authors = [
{ name="Ian Renton", email="ian@ianrenton.com" },
]
-1
View File
@@ -160,7 +160,6 @@ class WebServer:
V1APISpotHandler,
{
"spots": self._data_store.spots,
"spot_providers": self._data_providers,
**handler_opts,
},
),
+1 -1
View File
@@ -33,7 +33,7 @@ if __name__ == "__main__":
root.setLevel(LOG_LEVEL)
handler = logging.StreamHandler(sys.stdout)
handler.setLevel(LOG_LEVEL)
formatter = logging.Formatter("%(levelname)s : %(message)s")
formatter = logging.Formatter("%(asctime)s | %(levelname)7s | %(message)s", "%Y-%m-%d %H:%M:%S")
handler.setFormatter(formatter)
root.handlers.clear()
root.addHandler(handler)
+6 -2
View File
@@ -394,9 +394,11 @@ function setBasemap(basemapname) {
}
// OpenStreetMap.Mapnik.Dark is a synthetic variant that uses Mapnik tiles with a CSS filter applied
const providerName = basemapname === "OpenStreetMap.Mapnik.Dark" ? "OpenStreetMap.Mapnik" : basemapname;
const isCartoDB = basemapname === "CartoDB.Voyager" || basemapname === "CartoDB.DarkMatter";
backgroundTileLayer = L.tileLayer.provider(providerName, {
opacity: parseFloat($("#basemapOpacity").val()),
edgeBufferTiles: 1
edgeBufferTiles: 1,
key: isCartoDB ? CARTODB_API_KEY : null
});
backgroundTileLayer.addTo(map);
backgroundTileLayer.bringToBack();
@@ -529,9 +531,11 @@ function setUpMap() {
// Add basemap
loadedBasemap = $("#basemap").val();
const initialProviderName = loadedBasemap === "OpenStreetMap.Mapnik.Dark" ? "OpenStreetMap.Mapnik" : loadedBasemap;
const isCartoDB = loadedBasemap === "CartoDB.Voyager" || loadedBasemap === "CartoDB.DarkMatter";
backgroundTileLayer = L.tileLayer.provider(initialProviderName, {
opacity: parseFloat($("#basemapOpacity").val()),
edgeBufferTiles: 1
edgeBufferTiles: 1,
key: isCartoDB ? CARTODB_API_KEY : null
});
backgroundTileLayer.addTo(map);
backgroundTileLayer.bringToBack();
+2
View File
@@ -345,6 +345,7 @@ const SIG_ICONS = {
"SOTA": "fa-mountain-sun",
"WWFF": "fa-seedling",
"GMA": "fa-person-hiking",
"GMA Island": "fa-person-hiking",
"WWBOTA": "fa-radiation",
"HEMA": "fa-mound",
"IOTA": "fa-book-atlas",
@@ -372,6 +373,7 @@ const SIG_NAMES = {
"SOTA": "Summits on the Air",
"WWFF": "Worldwide Flora & Fauna",
"GMA": "Global Mountain Activity",
"GMA Island": "Global Mountain Activity - Islands",
"WWBOTA": "Bunkers on the Air",
"HEMA": "Humps Excluding Marilyns Award",
"IOTA": "Islands on the Air",
+3 -2
View File
@@ -801,12 +801,13 @@
}
},
CartoDB: {
url: 'https://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}{r}.png',
url: 'https://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}{r}.png?key={key}',
options: {
attribution: '{attribution.OpenStreetMap} &copy; <a href="https://carto.com/attributions">CARTO</a>',
subdomains: 'abcd',
maxZoom: 20,
variant: 'light_all'
variant: 'light_all',
key: '<insert your API key here>'
},
variants: {
Positron: 'light_all',
+1 -1
View File
@@ -76,7 +76,7 @@
</div>
<script src="/static/js/add-spot.js?v=1787207421"></script>
<script src="/static/js/add-spot.js?v=1787929803"></script>
<script>$(document).ready(function () {
$("#nav-link-add-spot").addClass("active");
}); <!-- highlight active page in nav --></script>
+1 -1
View File
@@ -84,7 +84,7 @@
</div>
<script src="/static/js/alerts.js?v=1787207421"></script>
<script src="/static/js/alerts.js?v=1787929803"></script>
<script>$(document).ready(function () {
$("#nav-link-alerts").addClass("active");
}); <!-- highlight active page in nav --></script>
+2 -2
View File
@@ -76,8 +76,8 @@
</div>
<script src="/static/js/spotsbandsandmap.js?v=1787207421"></script>
<script src="/static/js/bands.js?v=1787207421"></script>
<script src="/static/js/spotsbandsandmap.js?v=1787929803"></script>
<script src="/static/js/bands.js?v=1787929803"></script>
<script>$(document).ready(function () {
$("#nav-link-bands").addClass("active");
}); <!-- highlight active page in nav --></script>
+5 -5
View File
@@ -1,6 +1,6 @@
{% extends "skeleton.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/css/style.css?v=1787207421" type="text/css">
<link rel="stylesheet" href="/static/css/style.css?v=1787929803" 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=1787207421"></script>
<script src="/static/js/ui-ham.js?v=1787207421"></script>
<script src="/static/js/geo.js?v=1787207421"></script>
<script src="/static/js/common.js?v=1787207421"></script>
<script src="/static/js/utils.js?v=1787929803"></script>
<script src="/static/js/ui-ham.js?v=1787929803"></script>
<script src="/static/js/geo.js?v=1787929803"></script>
<script src="/static/js/common.js?v=1787929803"></script>
{% end %}
{% block body %}
<div class="container">
+1 -1
View File
@@ -6,7 +6,7 @@
oninput="filtersUpdated();" style="width: 5em; display: inline-block;">
{% for a in web_ui_options["max_spot_age"] %}
<option value="{{a*60}}" {% if web_ui_options[
"max_spot_age_default"] == a*60 %}selected{% end %}>{{a}}</option>
"max_spot_age_default"] == a %}selected{% end %}>{{a}}</option>
{% end %}
</select>
minutes
+1 -1
View File
@@ -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=1787207421"></script>
<script src="/static/js/conditions.js?v=1787929803"></script>
<script>$(document).ready(function () {
$("#nav-link-conditions").addClass("active");
}); <!-- highlight active page in nav --></script>
+6 -2
View File
@@ -109,8 +109,12 @@
<script src="/static/vendor/js/leaflet-cqzones.js"></script>
<script src="/static/vendor/js/leaflet-workedallbritainireland.js" type="module"></script>
<script src="/static/js/spotsbandsandmap.js?v=1787207421"></script>
<script src="/static/js/map.js?v=1787207421"></script>
<script>
const CARTODB_API_KEY = "{{ web_ui_options.get('cartodb_api_key', '') }}";
</script>
<script src="/static/js/spotsbandsandmap.js?v=1787929802"></script>
<script src="/static/js/map.js?v=1787929802"></script>
<script>$(document).ready(function () {
$("#nav-link-map").addClass("active");
}); <!-- highlight active page in nav --></script>
+2 -2
View File
@@ -113,8 +113,8 @@
</div>
<script src="/static/js/spotsbandsandmap.js?v=1787207421"></script>
<script src="/static/js/spots.js?v=1787207421"></script>
<script src="/static/js/spotsbandsandmap.js?v=1787929802"></script>
<script src="/static/js/spots.js?v=1787929802"></script>
<script>$(document).ready(function () {
$("#nav-link-spots").addClass("active");
}); <!-- highlight active page in nav --></script>
+1 -1
View File
@@ -86,7 +86,7 @@
</div>
</div>
<script src="/static/js/status.js?v=1787207421"></script>
<script src="/static/js/status.js?v=1787929803"></script>
<script>
$(document).ready(function () {
$("#nav-link-status").addClass("active");