mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Extract SIG and SIG_INFO from cluster spots. Closes #47
This commit is contained in:
@@ -4,6 +4,7 @@ from datetime import datetime
|
||||
import pytz
|
||||
|
||||
from alertproviders.http_alert_provider import HTTPAlertProvider
|
||||
from core.utils import get_icon_for_sig
|
||||
from data.alert import Alert
|
||||
|
||||
|
||||
@@ -39,6 +40,7 @@ class ParksNPeaks(HTTPAlertProvider):
|
||||
sig=source_alert["Class"],
|
||||
sig_refs=[sig_ref],
|
||||
sig_refs_names=[sig_ref_name],
|
||||
icon=get_icon_for_sig(source_alert["Class"]),
|
||||
start_time=start_time,
|
||||
is_dxpedition=False)
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ from datetime import datetime
|
||||
import pytz
|
||||
|
||||
from alertproviders.http_alert_provider import HTTPAlertProvider
|
||||
from core.utils import get_icon_for_sig
|
||||
from data.alert import Alert
|
||||
|
||||
|
||||
@@ -27,6 +28,7 @@ class POTA(HTTPAlertProvider):
|
||||
sig="POTA",
|
||||
sig_refs=[source_alert["reference"]],
|
||||
sig_refs_names=[source_alert["name"]],
|
||||
icon=get_icon_for_sig("POTA"),
|
||||
start_time=datetime.strptime(source_alert["startDate"] + source_alert["startTime"],
|
||||
"%Y-%m-%d%H:%M").replace(tzinfo=pytz.UTC).timestamp(),
|
||||
end_time=datetime.strptime(source_alert["endDate"] + source_alert["endTime"],
|
||||
|
||||
@@ -3,6 +3,7 @@ from datetime import datetime
|
||||
import pytz
|
||||
|
||||
from alertproviders.http_alert_provider import HTTPAlertProvider
|
||||
from core.utils import get_icon_for_sig
|
||||
from data.alert import Alert
|
||||
|
||||
|
||||
@@ -28,6 +29,7 @@ class SOTA(HTTPAlertProvider):
|
||||
sig="SOTA",
|
||||
sig_refs=[source_alert["associationCode"] + "/" + source_alert["summitCode"]],
|
||||
sig_refs_names=[source_alert["summitDetails"]],
|
||||
icon=get_icon_for_sig("SOTA"),
|
||||
start_time=datetime.strptime(source_alert["dateActivated"],
|
||||
"%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=pytz.UTC).timestamp(),
|
||||
is_dxpedition=False)
|
||||
|
||||
@@ -3,6 +3,7 @@ from datetime import datetime
|
||||
import pytz
|
||||
|
||||
from alertproviders.http_alert_provider import HTTPAlertProvider
|
||||
from core.utils import get_icon_for_sig
|
||||
from data.alert import Alert
|
||||
|
||||
|
||||
@@ -26,6 +27,7 @@ class WWFF(HTTPAlertProvider):
|
||||
comment=source_alert["remarks"],
|
||||
sig="WWFF",
|
||||
sig_refs=[source_alert["reference"]],
|
||||
icon=get_icon_for_sig("WWFF"),
|
||||
start_time=datetime.strptime(source_alert["utc_start"],
|
||||
"%Y-%m-%d %H:%M:%S").replace(tzinfo=pytz.UTC).timestamp(),
|
||||
end_time=datetime.strptime(source_alert["utc_end"],
|
||||
|
||||
Reference in New Issue
Block a user