about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xmeteor.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/meteor.py b/meteor.py
index fb3179c..0188f06 100755
--- a/meteor.py
+++ b/meteor.py
@@ -8,7 +8,7 @@ import fscache as fs
 
 base_url = 'https://api.weather.gov'
 headers = {
-    'user-agent': 'meteor.py/0.1 (us@starfall.systems)',
+    'user-agent': 'meteor.py/0.2 (us@starfall.systems)',
     'accept': 'application/ld+json'
 }
 
@@ -72,12 +72,8 @@ def print_forecast(point):
         # probabilityOfPrecipitation is the neatest one that's not in .../forecast or .../forecast/hourly
         # but there's also relativeHumidity, apparentTemperature (and, separately, windChill), skyCover, windGust
         # downside, it appears to always convert the F/mph measurements into C/kph for no reason. e.g. all temps are measured in 9ths of C
-    
-        # TODO pick out location name from somewhere.
-        # city and state hide in point.relativeLocation.properties.city (and state)
-        # getting the county or zone's `name (id) state` is good too
 
-        buffer = f'{term.BOLD}forecast'
+        buffer = f'{term.BOLD}forecast for {point.get("relativeLocation").get("city")}, {point.get("relativeLocation").get("state")}'
         buffer += '\n' + f'===================={term.RESET}'
         periods = forecast.get('periods')
         # print today and tonight in long format