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

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: