diff options
-rwxr-xr-x | weather.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/weather.py b/weather.py index 2f769e6..a30a4e7 100755 --- a/weather.py +++ b/weather.py @@ -35,7 +35,7 @@ def print_alerts(county, zone): print(f'===================={term.RESET}') for alert in alerts.get('@graph'): print(f'{alert.get("headline")}') - print(f' Severity: {alert.get("severity")}') + print(f' {alert.get("severity")} - {alert.get("certainty")} - {alert.get("urgency")}') print(f' Until: {alert.get("expires")}') print(f'{alert.get("description")}') # TODO description can be quite long @@ -51,6 +51,7 @@ def print_alerts(county, zone): # messageType: Alert, Update # can construct the headline ourseves as f'{event} issued {sent} [until {end}] by {senderName}' + print() def print_forecast(forecast_url): # TODO pick up gridId AFC (AER/ALU), AFG, AJK, BOX< CAE, DLH, FSD, HGX, HNX, LIX, LWX, MAF, MFR, MLB, MRX, MTR, PIH and reduce gridX and gridY by 1 - known issue @@ -90,6 +91,7 @@ def main(): # TODO can hazardous weather outlook be gotten programatically? + forecast_url = point.get('forecast') print_forecast(forecast_url) |