mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 16:59:25 +00:00
Add icons #7
This commit is contained in:
@@ -47,6 +47,7 @@ class APRSIS(Provider):
|
||||
comment=data["comment"] if "comment" in data else None,
|
||||
latitude=data["latitude"] if "latitude" in data else None,
|
||||
longitude=data["longitude"] if "longitude" in data else None,
|
||||
icon="tower-cell",
|
||||
time=datetime.now(pytz.UTC)) # APRS-IS spots are live so we can assume spot time is "now"
|
||||
|
||||
# Add to our list
|
||||
|
||||
@@ -69,6 +69,7 @@ class DXCluster(Provider):
|
||||
de_call=match.group(1),
|
||||
freq=float(match.group(2)),
|
||||
comment=match.group(4).strip(),
|
||||
icon="desktop",
|
||||
time=spot_datetime)
|
||||
|
||||
# Add to our list
|
||||
|
||||
@@ -32,6 +32,7 @@ class GMA(HTTPProvider):
|
||||
comment=source_spot["TEXT"],
|
||||
sig_refs=[source_spot["REF"]],
|
||||
sig_refs_names=[source_spot["NAME"]],
|
||||
icon="person-hiking",
|
||||
time=datetime.strptime(source_spot["DATE"] + source_spot["TIME"], "%Y%m%d%H%M").replace(tzinfo=pytz.UTC),
|
||||
latitude=float(source_spot["LAT"]) if (source_spot["LAT"] != "") else None, # Seen GMA spots with no lat/lon
|
||||
longitude=float(source_spot["LON"]) if (source_spot["LON"] != "") else None)
|
||||
|
||||
@@ -54,6 +54,7 @@ class HEMA(HTTPProvider):
|
||||
sig="HEMA",
|
||||
sig_refs=[spot_items[3].upper()],
|
||||
sig_refs_names=[spot_items[4]],
|
||||
icon="person-hiking",
|
||||
time=datetime.strptime(spot_items[0], "%d/%m/%Y %H:%M").replace(tzinfo=pytz.UTC),
|
||||
latitude=float(spot_items[7]),
|
||||
longitude=float(spot_items[8]))
|
||||
|
||||
@@ -29,6 +29,7 @@ class ParksNPeaks(HTTPProvider):
|
||||
comment=source_spot["actComments"],
|
||||
sig=source_spot["actClass"],
|
||||
sig_refs=[source_spot["actSiteID"]],
|
||||
icon="question", # todo determine from actClass
|
||||
time=datetime.strptime(source_spot["actTime"], "%Y-%m-%d %H:%M:%S").replace(tzinfo=pytz.UTC))
|
||||
|
||||
# If this is POTA, SOTA or WWFF data we already have it through other means, so ignore.
|
||||
|
||||
@@ -29,6 +29,7 @@ class POTA(HTTPProvider):
|
||||
sig="POTA",
|
||||
sig_refs=[source_spot["reference"]],
|
||||
sig_refs_names=[source_spot["name"]],
|
||||
icon="tree",
|
||||
time=datetime.strptime(source_spot["spotTime"], "%Y-%m-%dT%H:%M:%S").replace(tzinfo=pytz.UTC),
|
||||
grid=source_spot["grid6"],
|
||||
latitude=source_spot["latitude"],
|
||||
|
||||
@@ -70,6 +70,7 @@ class RBN(Provider):
|
||||
de_call=match.group(1),
|
||||
freq=float(match.group(2)),
|
||||
comment=match.group(4).strip(),
|
||||
icon="tower-cell",
|
||||
time=spot_datetime)
|
||||
|
||||
# Add to our list
|
||||
|
||||
@@ -48,6 +48,7 @@ class SOTA(HTTPProvider):
|
||||
sig="SOTA",
|
||||
sig_refs=[source_spot["summitCode"]],
|
||||
sig_refs_names=[source_spot["summitName"]],
|
||||
icon="mountain-sun",
|
||||
time=datetime.fromisoformat(source_spot["timeStamp"]),
|
||||
activation_score=source_spot["points"])
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ class WWBOTA(HTTPProvider):
|
||||
sig="WWBOTA",
|
||||
sig_refs=refs,
|
||||
sig_refs_names=ref_names,
|
||||
icon="radiation",
|
||||
time=datetime.fromisoformat(source_spot["time"]),
|
||||
# WWBOTA spots can contain multiple references for bunkers being activated simultaneously. For
|
||||
# now, we will just pick the first one to use as our grid, latitude and longitude.
|
||||
|
||||
@@ -29,6 +29,7 @@ class WWFF(HTTPProvider):
|
||||
sig="WWFF",
|
||||
sig_refs=[source_spot["reference"]],
|
||||
sig_refs_names=[source_spot["reference_name"]],
|
||||
icon="seedling",
|
||||
time=datetime.fromtimestamp(source_spot["spot_time"]).replace(tzinfo=pytz.UTC),
|
||||
latitude=source_spot["latitude"],
|
||||
longitude=source_spot["longitude"])
|
||||
|
||||
Reference in New Issue
Block a user