diff --git a/SkyControl.py b/SkyControl.py index 4ef8a20..aa9f351 100644 --- a/SkyControl.py +++ b/SkyControl.py @@ -1,7 +1,7 @@ #!/usr/bin/python3 """ -SkyControl.py v0.5.1 by Mason Nelson +SkyControl.py v0.5.3 by Mason Nelson ================================== A Control Script for SkywarnPlus diff --git a/SkyDescribe.py b/SkyDescribe.py index 56b5bb1..c0f9c4e 100644 --- a/SkyDescribe.py +++ b/SkyDescribe.py @@ -1,7 +1,7 @@ #!/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 diff --git a/SkywarnPlus.py b/SkywarnPlus.py index a657bd3..3ccb5cc 100644 --- a/SkywarnPlus.py +++ b/SkywarnPlus.py @@ -1,7 +1,7 @@ #!/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 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) 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): LOGGER.info("Data file does not exist, assuming first run.") + LOGGER.info("Initializing data file") + save_state(state) if enable_ct_auto_change: LOGGER.info("Initializing CT files") change_ct("NORMAL") @@ -1534,10 +1540,6 @@ def main(): empty_alerts = OrderedDict() build_tailmessage(empty_alerts) - # Load previous alert data to compare changes - state = load_state() - last_alerts = state["last_alerts"] - # Fetch new alert data alerts = get_alerts(COUNTY_CODES) diff --git a/config.yaml b/config.yaml index a37a556..e6e8c83 100644 --- a/config.yaml +++ b/config.yaml @@ -1,4 +1,4 @@ -# SkywarnPlus v0.5.1 Configuration File +# SkywarnPlus v0.5.3 Configuration File # Author: Mason Nelson (N5LSN/WRKF394) # Please edit this file according to your specific requirements.