v0.5.3 update

pull/140/head v0.5.3
Mason10198 2 years ago
parent 8e6ca6336c
commit 1d218cede8

@ -1,7 +1,7 @@
#!/usr/bin/python3 #!/usr/bin/python3
""" """
SkyControl.py v0.5.1 by Mason Nelson SkyControl.py v0.5.3 by Mason Nelson
================================== ==================================
A Control Script for SkywarnPlus A Control Script for SkywarnPlus

@ -1,7 +1,7 @@
#!/usr/bin/python3 #!/usr/bin/python3
""" """
SkyDescribe.py v0.5.1 by Mason Nelson SkyDescribe.py v0.5.3 by Mason Nelson
================================================== ==================================================
Text to Speech conversion for Weather Descriptions Text to Speech conversion for Weather Descriptions

@ -1,7 +1,7 @@
#!/usr/bin/python3 #!/usr/bin/python3
""" """
SkywarnPlus.py v0.5.1 by Mason Nelson SkywarnPlus.py v0.5.3 by Mason Nelson
=============================================================================== ===============================================================================
SkywarnPlus is a utility that retrieves severe weather alerts from the National SkywarnPlus is a utility that retrieves severe weather alerts from the National
Weather Service and integrates these alerts with an Asterisk/app_rpt based Weather Service and integrates these alerts with an Asterisk/app_rpt based
@ -1520,9 +1520,15 @@ def main():
supermon_compat_enabled = config["DEV"].get("SupermonCompat", True) supermon_compat_enabled = config["DEV"].get("SupermonCompat", True)
say_alerts_changed = config["Alerting"].get("SayAlertsChanged", True) say_alerts_changed = config["Alerting"].get("SayAlertsChanged", True)
# If data file does not exist, assume this is the first run and initialize CT/ID/Tailmessage files if enabled # Load previous alert data to compare changes
state = load_state()
last_alerts = state["last_alerts"]
# If data file does not exist, assume this is the first run and initialize data file and CT/ID/Tailmessage files if enabled
if not os.path.isfile(DATA_FILE): if not os.path.isfile(DATA_FILE):
LOGGER.info("Data file does not exist, assuming first run.") LOGGER.info("Data file does not exist, assuming first run.")
LOGGER.info("Initializing data file")
save_state(state)
if enable_ct_auto_change: if enable_ct_auto_change:
LOGGER.info("Initializing CT files") LOGGER.info("Initializing CT files")
change_ct("NORMAL") change_ct("NORMAL")
@ -1534,10 +1540,6 @@ def main():
empty_alerts = OrderedDict() empty_alerts = OrderedDict()
build_tailmessage(empty_alerts) build_tailmessage(empty_alerts)
# Load previous alert data to compare changes
state = load_state()
last_alerts = state["last_alerts"]
# Fetch new alert data # Fetch new alert data
alerts = get_alerts(COUNTY_CODES) alerts = get_alerts(COUNTY_CODES)

@ -1,4 +1,4 @@
# SkywarnPlus v0.5.1 Configuration File # SkywarnPlus v0.5.3 Configuration File
# Author: Mason Nelson (N5LSN/WRKF394) # Author: Mason Nelson (N5LSN/WRKF394)
# Please edit this file according to your specific requirements. # Please edit this file according to your specific requirements.

Loading…
Cancel
Save

Powered by TurnKey Linux.