ealert FEMA alerting

this code is still very early
This commit is contained in:
SpudGunMan
2024-12-10 17:48:40 -08:00
parent 53adb4be70
commit daf43f306b
3 changed files with 8 additions and 3 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ import bs4 as bs # pip install beautifulsoup4
import xml.dom.minidom
from modules.log import *
trap_list_location = ("whereami", "tide", "moon", "wx", "wxc", "wxa", "wxalert", "rlist")
trap_list_location = ("whereami", "tide", "moon", "wx", "wxc", "wxa", "wxalert", "rlist", "ealert")
def where_am_i(lat=0, lon=0, short=False, zip=False):
whereIam = ""
@@ -522,7 +522,7 @@ def getIpawsAlert(lat=0, lon=0):
# return the numWxAlerts of alerts
if len(alerts) > 0:
for alertItem in alerts[:numWxAlerts]:
alert += abbreviate_noaa(f"🚨 FEMA Alert: {alertItem['headline']}\n{alertItem['description']}")
alert += abbreviate_noaa(f"🚨FEMA Alert: {alertItem['headline']}\n{alertItem['description']}")
if alertItem != alerts[:numWxAlerts][-1]:
alert += "\n"
else:
+1 -1
View File
@@ -72,7 +72,7 @@ if enableCmdHistory:
if location_enabled:
from modules.locationdata import * # from the spudgunman/meshing-around repo
trap_list = trap_list + trap_list_location # items tide, whereami, wxc, wx
help_message = help_message + ", whereami, wx, wxc, rlist"
help_message = help_message + ", whereami, wx, wxc, rlist, ealert"
# Open-Meteo Configuration for worldwide weather
if use_meteo_wxApi: