Compare commits
5 Commits
d6cc2673dd
...
1.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf46017917 | ||
|
|
c30e1616d3 | ||
|
|
422c917073 | ||
|
|
cad1f5cfdf | ||
|
|
78f8cd26f0 |
@@ -4,7 +4,7 @@ from data.sig import SIG
|
||||
|
||||
# General software
|
||||
SOFTWARE_NAME = "Spothole by M0TRT"
|
||||
SOFTWARE_VERSION = "1.0"
|
||||
SOFTWARE_VERSION = "1.0.1"
|
||||
|
||||
# HTTP headers used for spot providers that use HTTP
|
||||
HTTP_HEADERS = {"User-Agent": SOFTWARE_NAME + ", v" + SOFTWARE_VERSION + " (operated by " + SERVER_OWNER_CALLSIGN + ")"}
|
||||
|
||||
@@ -5,7 +5,6 @@ import pytz
|
||||
|
||||
from core.cache_utils import SEMI_STATIC_URL_DATA_CACHE
|
||||
from core.constants import HTTP_HEADERS
|
||||
from core.sig_utils import get_icon_for_sig
|
||||
from data.sig_ref import SIGRef
|
||||
from data.spot import Spot
|
||||
from spotproviders.http_spot_provider import HTTPSpotProvider
|
||||
@@ -51,7 +50,7 @@ class GMA(HTTPSpotProvider):
|
||||
# spots come through with reftype=POTA or reftype=WWFF. SOTA is harder to figure out because both SOTA
|
||||
# and GMA summits come through with reftype=Summit, so we must check for the presence of a "sota" entry
|
||||
# to determine if it's a SOTA summit.
|
||||
if ref_info["reftype"] not in ["POTA", "WWFF"] and (ref_info["reftype"] != "Summit" or ref_info["sota"] == ""):
|
||||
if "reftype" in ref_info and ref_info["reftype"] not in ["POTA", "WWFF"] and (ref_info["reftype"] != "Summit" or ref_info["sota"] == ""):
|
||||
match ref_info["reftype"]:
|
||||
case "Summit":
|
||||
spot.sig_refs[0].sig = "GMA"
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import logging
|
||||
import re
|
||||
from datetime import datetime
|
||||
|
||||
import pytz
|
||||
from rss_parser import RSSParser
|
||||
|
||||
from core.sig_utils import get_icon_for_sig
|
||||
from data.sig_ref import SIGRef
|
||||
from data.spot import Spot
|
||||
from spotproviders.http_spot_provider import HTTPSpotProvider
|
||||
@@ -12,7 +13,7 @@ from spotproviders.http_spot_provider import HTTPSpotProvider
|
||||
# Spot provider for Wainwrights on the Air
|
||||
class WOTA(HTTPSpotProvider):
|
||||
POLL_INTERVAL_SEC = 120
|
||||
SPOTS_URL = "https://www.wota.org.uk/spots_rss.php"
|
||||
SPOTS_URL = "http://127.0.0.1:8000/spots_rss.php"
|
||||
LIST_URL = "https://www.wota.org.uk/mapping/data/summits.json"
|
||||
RSS_DATE_TIME_FORMAT = "%a, %d %b %Y %H:%M:%S %z"
|
||||
|
||||
@@ -25,6 +26,7 @@ class WOTA(HTTPSpotProvider):
|
||||
# Iterate through source data
|
||||
for source_spot in rss.channel.items:
|
||||
|
||||
try:
|
||||
# Reject GUID missing or zero
|
||||
if not source_spot.guid or not source_spot.guid.content or source_spot.guid.content == "http://www.wota.org.uk/spots/0":
|
||||
continue
|
||||
@@ -43,16 +45,16 @@ class WOTA(HTTPSpotProvider):
|
||||
# Pick apart the description
|
||||
desc_split = source_spot.description.split(". ")
|
||||
freq_mode = desc_split[0].replace("Frequencies/modes:", "").strip()
|
||||
freq_mode_split = freq_mode.split("-")
|
||||
freq_mode_split = re.split(r'[\-\s]+', freq_mode)
|
||||
freq_hz = float(freq_mode_split[0]) * 1000000
|
||||
mode = freq_mode_split[1]
|
||||
mode = freq_mode_split[1].upper()
|
||||
|
||||
comment = None
|
||||
if len(desc_split) > 1:
|
||||
comment = desc_split[1].strip()
|
||||
spotter = None
|
||||
if len(desc_split) > 2:
|
||||
spotter = desc_split[2].replace("Spotted by ", "").replace(".", "").strip()
|
||||
spotter = desc_split[2].replace("Spotted by ", "").replace(".", "").upper().strip()
|
||||
|
||||
time = datetime.strptime(source_spot.pub_date.content, self.RSS_DATE_TIME_FORMAT).astimezone(pytz.UTC)
|
||||
|
||||
@@ -68,4 +70,6 @@ class WOTA(HTTPSpotProvider):
|
||||
time=time.timestamp())
|
||||
|
||||
new_spots.append(spot)
|
||||
except Exception as e:
|
||||
logging.error("Exception parsing WOTA spot", e)
|
||||
return new_spots
|
||||
|
||||
@@ -532,7 +532,7 @@ paths:
|
||||
example: England
|
||||
flag:
|
||||
type: string
|
||||
description: Country flag of the operator. This is limited to the range of emoji flags, and for many DXCCs there will not be a flag, e.g. Northern Ireland. Many DXCCs may also have the same flag, e.g. mainland Spain, Balearic Islands, etc.
|
||||
description: Country flag of the operator. This is limited to the range of emoji flags. For some DXCCs there may not be an official emoji flag, e.g. Northern Ireland, so the appearance may vary depending on your browser and operating system. Some small islands may also have no flag. Many DXCCs may also share a flag, e.g. mainland Spain, Balearic Islands, etc.
|
||||
example: ""
|
||||
continent:
|
||||
type: string
|
||||
@@ -763,7 +763,7 @@ components:
|
||||
example: England
|
||||
dx_flag:
|
||||
type: string
|
||||
description: Country flag of the DX operator. This is limited to the range of emoji flags, and for many DXCCs there will not be a flag, e.g. Northern Ireland. Many DXCCs may also have the same flag, e.g. mainland Spain, Balearic Islands, etc.
|
||||
description: Country flag of the DX operator. This is limited to the range of emoji flags. For some DXCCs there may not be an official emoji flag, e.g. Northern Ireland, so the appearance may vary depending on your browser and operating system. Some small islands may also have no flag. Many DXCCs may also share a flag, e.g. mainland Spain, Balearic Islands, etc.
|
||||
example: ""
|
||||
dx_continent:
|
||||
type: string
|
||||
@@ -830,7 +830,7 @@ components:
|
||||
example: England
|
||||
de_flag:
|
||||
type: string
|
||||
description: Country flag of the spotter. This is limited to the range of emoji flags, and for many DXCCs there will not be a flag, e.g. Northern Ireland. Many DXCCs may also have the same flag, e.g. mainland Spain, Balearic Islands, etc.
|
||||
description: Country flag of the spotter. This is limited to the range of emoji flags. For some DXCCs there may not be an official emoji flag, e.g. Northern Ireland, so the appearance may vary depending on your browser and operating system. Some small islands may also have no flag. Many DXCCs may also share a flag, e.g. mainland Spain, Balearic Islands, etc.
|
||||
example: ""
|
||||
de_continent:
|
||||
type: string
|
||||
@@ -1054,7 +1054,7 @@ components:
|
||||
example: England
|
||||
dx_flag:
|
||||
type: string
|
||||
description: Country flag of the DX operator. This is limited to the range of emoji flags, and for many DXCCs there will not be a flag, e.g. Northern Ireland. Many DXCCs may also have the same flag, e.g. mainland Spain, Balearic Islands, etc.
|
||||
description: Country flag of the DX operator. This is limited to the range of emoji flags. For some DXCCs there may not be an official emoji flag, e.g. Northern Ireland, so the appearance may vary depending on your browser and operating system. Some small islands may also have no flag. Many DXCCs may also share a flag, e.g. mainland Spain, Balearic Islands, etc.
|
||||
example: ""
|
||||
dx_continent:
|
||||
type: string
|
||||
|
||||
@@ -71,11 +71,16 @@ td.nowrap, span.nowrap {
|
||||
|
||||
span.flag-wrapper {
|
||||
display: inline-block;
|
||||
width: 1.7em;
|
||||
width: 1.8em;
|
||||
text-align: center;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
img.flag {
|
||||
position: relative;
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
span.band-bullet {
|
||||
display: inline-block;
|
||||
cursor: default;
|
||||
|
||||
BIN
webassets/img/flags/1.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
webassets/img/flags/10.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
webassets/img/flags/100.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
webassets/img/flags/101.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
webassets/img/flags/102.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
webassets/img/flags/103.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
webassets/img/flags/104.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
webassets/img/flags/105.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
webassets/img/flags/106.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
webassets/img/flags/107.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
webassets/img/flags/108.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
webassets/img/flags/109.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
webassets/img/flags/11.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
webassets/img/flags/110.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
webassets/img/flags/111.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
webassets/img/flags/112.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
webassets/img/flags/113.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
webassets/img/flags/114.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
webassets/img/flags/115.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
webassets/img/flags/116.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
webassets/img/flags/117.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
webassets/img/flags/118.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
webassets/img/flags/119.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
webassets/img/flags/12.png
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
BIN
webassets/img/flags/120.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
webassets/img/flags/122.png
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
BIN
webassets/img/flags/123.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
webassets/img/flags/124.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
webassets/img/flags/125.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
webassets/img/flags/126.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
webassets/img/flags/127.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
webassets/img/flags/128.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
webassets/img/flags/129.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
webassets/img/flags/13.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
webassets/img/flags/130.png
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
BIN
webassets/img/flags/131.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
webassets/img/flags/132.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
webassets/img/flags/133.png
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
webassets/img/flags/134.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
webassets/img/flags/135.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
webassets/img/flags/136.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
webassets/img/flags/137.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
webassets/img/flags/138.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
webassets/img/flags/139.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
webassets/img/flags/14.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
webassets/img/flags/140.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
webassets/img/flags/141.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
webassets/img/flags/142.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
webassets/img/flags/143.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
webassets/img/flags/144.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
webassets/img/flags/145.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
webassets/img/flags/146.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
webassets/img/flags/147.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
webassets/img/flags/148.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
webassets/img/flags/149.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
webassets/img/flags/15.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
webassets/img/flags/150.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
webassets/img/flags/151.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
webassets/img/flags/152.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
webassets/img/flags/153.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
webassets/img/flags/154.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
webassets/img/flags/155.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
webassets/img/flags/157.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
webassets/img/flags/158.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
webassets/img/flags/159.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
webassets/img/flags/16.png
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
webassets/img/flags/160.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
webassets/img/flags/161.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
webassets/img/flags/162.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
webassets/img/flags/163.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
webassets/img/flags/164.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
webassets/img/flags/165.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
webassets/img/flags/166.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
webassets/img/flags/167.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
webassets/img/flags/168.png
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
BIN
webassets/img/flags/169.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
webassets/img/flags/17.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
webassets/img/flags/170.png
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
webassets/img/flags/171.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
webassets/img/flags/172.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
webassets/img/flags/173.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
webassets/img/flags/174.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
webassets/img/flags/175.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
webassets/img/flags/176.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
webassets/img/flags/177.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
webassets/img/flags/178.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
webassets/img/flags/179.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
webassets/img/flags/18.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
webassets/img/flags/180.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
webassets/img/flags/181.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
webassets/img/flags/182.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
webassets/img/flags/183.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
webassets/img/flags/184.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
webassets/img/flags/185.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
webassets/img/flags/186.png
Normal file
|
After Width: | Height: | Size: 348 B |