From 8079ce09e9fdbfd4d23157be06c3357b32901973 Mon Sep 17 00:00:00 2001 From: April Date: Sat, 8 Oct 2022 15:55:02 -0700 Subject: [PATCH] Alerts.py --> recordGenerators/Alerts.py --- Alerts.py => recordGenerators/Alerts.py | 6 +++++- recordGenerators/CurrentConditions.py | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) rename Alerts.py => recordGenerators/Alerts.py (98%) create mode 100644 recordGenerators/CurrentConditions.py diff --git a/Alerts.py b/recordGenerators/Alerts.py similarity index 98% rename from Alerts.py rename to recordGenerators/Alerts.py index 1ed36c4..ba9b7d1 100644 --- a/Alerts.py +++ b/recordGenerators/Alerts.py @@ -10,7 +10,7 @@ import gzip import py2Lib.bit as bit #Zones/Counties to fetch alerts for -interestList = ['FLZ151', 'FLC057', 'FLZ149', 'FLZ249', 'FLC101'] +interestList = ['FLZ151', 'FLC057', 'FLZ149', 'FLZ249', 'FLC101'] # TODO: Grab these automatically from MachineProductCfg.xml #You can safely edit the API key here. Make sure to include the ' before and after the key headlineApiKey = '21d8a80b3d6b444998a80b3d6b1449d3' @@ -18,6 +18,7 @@ detailsApiKey = '21d8a80b3d6b444998a80b3d6b1449d3' #Where does this script live? Put path below. #Sorry I'm too lazy to program this script figure it out itself. +#TODO: Find the path automatically path = 'D:\\PythonScripts\\Alerts' k = 0 @@ -309,6 +310,9 @@ def getAlerts(location): c.close() +# TODO: This should be converted into a function so it works better with async, that way we're not getting hung up on that time.sleep() call. + + n = 0 while n==0: #Start our XML File diff --git a/recordGenerators/CurrentConditions.py b/recordGenerators/CurrentConditions.py new file mode 100644 index 0000000..30a8220 --- /dev/null +++ b/recordGenerators/CurrentConditions.py @@ -0,0 +1,7 @@ +import requests + +apiKey = '' + + +def getCurrentConditions(locId): + pass \ No newline at end of file