I suppose this is as good a time as any to plug noaa, a CLI tool that can give you the current conditions and forecast, but also allows you to retrieve any product the US National Weather Service produces. It’s way geekier than the above, but perhaps more useful for some. https://github.com/sramsay/nowa/ (I am also the author of wu, which was a popular cli tool for the Weather Underground API. I had to discontinue th…
Thank you for wu and this too, Please enlighten me on why nowa is written in C, would you?
Weatherme CLI Tool
21–30 of 30 posts
Re: Weatherme CLI Tool
#22 # Set this:
latlong='33.7737,-118.1365'
url=$(curl -sS "https://api.weather.gov/points/$latlong" | jq -r '.properties.forecastHourly')
curl -sS "$url" | jq -r '.properties | .periods[0].temperature, .generatedAt'
Using Python. import requests
# Set this:
latlong = '33.7737,-118.1365'
session = requests.Session()
url = session.get('https://api.weather.gov/points/' + latlong).json()['properties']['forecastHourly']
f = session.get(url).json()['properties']
print(f['periods'][0]['temperature'])
print(f['generatedAt'])Re: Weatherme CLI Tool
#23Reminds me of `curl wttr.in` -- although slightly more verbose in some metrics.
alias weather='f() { curl wttr.in/${1:-sydney} };f'Re: Weatherme CLI Tool
#24I suppose this is as good a time as any to plug noaa, a CLI tool that can give you the current conditions and forecast, but also allows you to retrieve any product the US National Weather Service produces. It’s way geekier than the above, but perhaps more useful for some. https://github.com/sramsay/nowa/ (I am also the author of wu, which was a popular cli tool for the Weather Underground API. I had to discontinue th…
Thank you for wu and this too, Please enlighten me on why nowa is written in C, would you?
Re: Weatherme CLI Tool
#25Re: Weatherme CLI Tool
#26Re: Weatherme CLI Tool
#27Re: Weatherme CLI Tool
#28Re: Weatherme CLI Tool
#29Reminds me of `curl wttr.in` -- although slightly more verbose in some metrics.
I had the same thought; this is in my shell RC: alias weather='f() { curl wttr.in/${1:-sydney} };f'
Re: Weatherme CLI Tool
#30This cannot be the real secret api key? https://github.com/eoin-barr/weatherme/blob/master/cmd/root....
That function shows the state of error handling in Go.