mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 22:37:44 +00:00
Compare commits
5
Commits
a27a04b65d
...
2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14e4886c1b | ||
|
|
f346444ec3 | ||
|
|
6f21ac83b7 | ||
|
|
a20c29cdd1 | ||
|
|
1fd6611ac2 |
+7
-1
@@ -3,7 +3,7 @@ from data.band import Band
|
|||||||
from data.sig import SIG
|
from data.sig import SIG
|
||||||
|
|
||||||
# General software
|
# General software
|
||||||
SOFTWARE_VERSION = "2.0-pre"
|
SOFTWARE_VERSION = "2.0"
|
||||||
|
|
||||||
# HTTP headers used for spot providers that use HTTP
|
# HTTP headers used for spot providers that use HTTP
|
||||||
HTTP_HEADERS = {"User-Agent": f"Spothole v{SOFTWARE_VERSION} (operated by {SERVER_OWNER_CALLSIGN})"}
|
HTTP_HEADERS = {"User-Agent": f"Spothole v{SOFTWARE_VERSION} (operated by {SERVER_OWNER_CALLSIGN})"}
|
||||||
@@ -53,6 +53,12 @@ SIGS = [
|
|||||||
description="Islands on the Air",
|
description="Islands on the Air",
|
||||||
ref_regex=r"[A-Z]{2}\-\d{3}",
|
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(
|
SIG(
|
||||||
name="MOTA",
|
name="MOTA",
|
||||||
comment_names=["MOTA"],
|
comment_names=["MOTA"],
|
||||||
|
|||||||
@@ -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(' ', '-')}"
|
sig_ref.url = f"https://www.beachesontheair.com/beaches/{sig_ref.name.lower().replace(' ', '-')}"
|
||||||
return sig_ref
|
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 ###
|
### ACTUAL LOOKUP ###
|
||||||
#
|
#
|
||||||
# OK, this is something we have to look up. Now check to see if our data store contains reference data and use
|
# OK, this is something we have to look up. Now check to see if our data store contains reference data and use
|
||||||
|
|||||||
@@ -50,7 +50,8 @@ class DXCluster(SpotProvider):
|
|||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
self._running = False
|
self._running = False
|
||||||
self._telnet.close()
|
if self._telnet:
|
||||||
|
self._telnet.close()
|
||||||
self._thread.join()
|
self._thread.join()
|
||||||
|
|
||||||
def _handle(self):
|
def _handle(self):
|
||||||
|
|||||||
@@ -117,6 +117,9 @@ class GMA(HTTPSpotProvider):
|
|||||||
case "IOTA Island":
|
case "IOTA Island":
|
||||||
spot.sig_refs[0].sig = "IOTA"
|
spot.sig_refs[0].sig = "IOTA"
|
||||||
spot.sig = "IOTA"
|
spot.sig = "IOTA"
|
||||||
|
case "GMA Island":
|
||||||
|
spot.sig_refs[0].sig = "GMA Island"
|
||||||
|
spot.sig = "GMA Island"
|
||||||
case "Lighthouse (ILLW)":
|
case "Lighthouse (ILLW)":
|
||||||
spot.sig_refs[0].sig = "ILLW"
|
spot.sig_refs[0].sig = "ILLW"
|
||||||
spot.sig = "ILLW"
|
spot.sig = "ILLW"
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ class RBN(SpotProvider):
|
|||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
self._running = False
|
self._running = False
|
||||||
self._telnet.close()
|
if self._telnet:
|
||||||
|
self._telnet.close()
|
||||||
self._thread.join()
|
self._thread.join()
|
||||||
|
|
||||||
def _handle(self):
|
def _handle(self):
|
||||||
|
|||||||
+1
-1
@@ -33,7 +33,7 @@ if __name__ == "__main__":
|
|||||||
root.setLevel(LOG_LEVEL)
|
root.setLevel(LOG_LEVEL)
|
||||||
handler = logging.StreamHandler(sys.stdout)
|
handler = logging.StreamHandler(sys.stdout)
|
||||||
handler.setLevel(LOG_LEVEL)
|
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)
|
handler.setFormatter(formatter)
|
||||||
root.handlers.clear()
|
root.handlers.clear()
|
||||||
root.addHandler(handler)
|
root.addHandler(handler)
|
||||||
|
|||||||
@@ -345,6 +345,7 @@ const SIG_ICONS = {
|
|||||||
"SOTA": "fa-mountain-sun",
|
"SOTA": "fa-mountain-sun",
|
||||||
"WWFF": "fa-seedling",
|
"WWFF": "fa-seedling",
|
||||||
"GMA": "fa-person-hiking",
|
"GMA": "fa-person-hiking",
|
||||||
|
"GMA Island": "fa-person-hiking",
|
||||||
"WWBOTA": "fa-radiation",
|
"WWBOTA": "fa-radiation",
|
||||||
"HEMA": "fa-mound",
|
"HEMA": "fa-mound",
|
||||||
"IOTA": "fa-book-atlas",
|
"IOTA": "fa-book-atlas",
|
||||||
@@ -372,6 +373,7 @@ const SIG_NAMES = {
|
|||||||
"SOTA": "Summits on the Air",
|
"SOTA": "Summits on the Air",
|
||||||
"WWFF": "Worldwide Flora & Fauna",
|
"WWFF": "Worldwide Flora & Fauna",
|
||||||
"GMA": "Global Mountain Activity",
|
"GMA": "Global Mountain Activity",
|
||||||
|
"GMA Island": "Global Mountain Activity - Islands",
|
||||||
"WWBOTA": "Bunkers on the Air",
|
"WWBOTA": "Bunkers on the Air",
|
||||||
"HEMA": "Humps Excluding Marilyns Award",
|
"HEMA": "Humps Excluding Marilyns Award",
|
||||||
"IOTA": "Islands on the Air",
|
"IOTA": "Islands on the Air",
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/add-spot.js?v=1787207421"></script>
|
<script src="/static/js/add-spot.js?v=1787382663"></script>
|
||||||
<script>$(document).ready(function () {
|
<script>$(document).ready(function () {
|
||||||
$("#nav-link-add-spot").addClass("active");
|
$("#nav-link-add-spot").addClass("active");
|
||||||
}); <!-- highlight active page in nav --></script>
|
}); <!-- highlight active page in nav --></script>
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/alerts.js?v=1787207421"></script>
|
<script src="/static/js/alerts.js?v=1787382663"></script>
|
||||||
<script>$(document).ready(function () {
|
<script>$(document).ready(function () {
|
||||||
$("#nav-link-alerts").addClass("active");
|
$("#nav-link-alerts").addClass("active");
|
||||||
}); <!-- highlight active page in nav --></script>
|
}); <!-- highlight active page in nav --></script>
|
||||||
|
|||||||
@@ -76,8 +76,8 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/spotsbandsandmap.js?v=1787207421"></script>
|
<script src="/static/js/spotsbandsandmap.js?v=1787382663"></script>
|
||||||
<script src="/static/js/bands.js?v=1787207421"></script>
|
<script src="/static/js/bands.js?v=1787382663"></script>
|
||||||
<script>$(document).ready(function () {
|
<script>$(document).ready(function () {
|
||||||
$("#nav-link-bands").addClass("active");
|
$("#nav-link-bands").addClass("active");
|
||||||
}); <!-- highlight active page in nav --></script>
|
}); <!-- highlight active page in nav --></script>
|
||||||
|
|||||||
+5
-5
@@ -1,6 +1,6 @@
|
|||||||
{% extends "skeleton.html" %}
|
{% extends "skeleton.html" %}
|
||||||
{% block head_extra %}
|
{% 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=1787382663" type="text/css">
|
||||||
<link href="/static/vendor/css/bootstrap-5.3.8.min.css" rel="stylesheet">
|
<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/fontawesome-6.7.2.min.css" rel="stylesheet">
|
||||||
<link href="/static/vendor/css/solid-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;
|
window.fetchEventSource = fetchEventSource;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="/static/js/utils.js?v=1787207421"></script>
|
<script src="/static/js/utils.js?v=1787382663"></script>
|
||||||
<script src="/static/js/ui-ham.js?v=1787207421"></script>
|
<script src="/static/js/ui-ham.js?v=1787382663"></script>
|
||||||
<script src="/static/js/geo.js?v=1787207421"></script>
|
<script src="/static/js/geo.js?v=1787382663"></script>
|
||||||
<script src="/static/js/common.js?v=1787207421"></script>
|
<script src="/static/js/common.js?v=1787382663"></script>
|
||||||
{% end %}
|
{% end %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|||||||
@@ -284,7 +284,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/vendor/js/chart-4.4.9.umd.min.js"></script>
|
<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=1787382663"></script>
|
||||||
<script>$(document).ready(function () {
|
<script>$(document).ready(function () {
|
||||||
$("#nav-link-conditions").addClass("active");
|
$("#nav-link-conditions").addClass("active");
|
||||||
}); <!-- highlight active page in nav --></script>
|
}); <!-- highlight active page in nav --></script>
|
||||||
|
|||||||
+2
-2
@@ -109,8 +109,8 @@
|
|||||||
<script src="/static/vendor/js/leaflet-cqzones.js"></script>
|
<script src="/static/vendor/js/leaflet-cqzones.js"></script>
|
||||||
<script src="/static/vendor/js/leaflet-workedallbritainireland.js" type="module"></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/spotsbandsandmap.js?v=1787382663"></script>
|
||||||
<script src="/static/js/map.js?v=1787207421"></script>
|
<script src="/static/js/map.js?v=1787382663"></script>
|
||||||
<script>$(document).ready(function () {
|
<script>$(document).ready(function () {
|
||||||
$("#nav-link-map").addClass("active");
|
$("#nav-link-map").addClass("active");
|
||||||
}); <!-- highlight active page in nav --></script>
|
}); <!-- highlight active page in nav --></script>
|
||||||
|
|||||||
@@ -113,8 +113,8 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/spotsbandsandmap.js?v=1787207421"></script>
|
<script src="/static/js/spotsbandsandmap.js?v=1787382663"></script>
|
||||||
<script src="/static/js/spots.js?v=1787207421"></script>
|
<script src="/static/js/spots.js?v=1787382663"></script>
|
||||||
<script>$(document).ready(function () {
|
<script>$(document).ready(function () {
|
||||||
$("#nav-link-spots").addClass("active");
|
$("#nav-link-spots").addClass("active");
|
||||||
}); <!-- highlight active page in nav --></script>
|
}); <!-- highlight active page in nav --></script>
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/status.js?v=1787207421"></script>
|
<script src="/static/js/status.js?v=1787382663"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("#nav-link-status").addClass("active");
|
$("#nav-link-status").addClass("active");
|
||||||
|
|||||||
Reference in New Issue
Block a user