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.
(I am also the author of wu, which was a popular cli tool for the Weather Underground API. I had to discontinue that when they closed free access to their API. That was written in Go; this one is written in C).
I just don’t understand why this is better than returning an error to caller? E.g have an err return type that could be nil. This type of practice just seems to ask for undefined behavior or debugging frustration. when you finally track down this log statement, we have multiple call sites to choose from to determine where this free form log string came from. Hopefully the same generic string was not used in a separate function!
AnsiWeather is a Shell script for displaying the current weather conditions in your terminal, with support for ANSI colors and Unicode symbols. Weather data comes from the OpenWeatherMap free weather API.
AnsiWeather packages are available for: OpenBSD, NetBSD, FreeBSD, Debian, Ubuntu, Homebrew
Interesting -- why do you define an alias that defines and then immediately calls a function instead of just defining `weather` as the function itself?
This is delightful! I really love how understated the README is “the cli tool that no one needs”, and also two DP on the temperature. I will clone and start using first thing in the morning. Thank you.
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 that when they closed free access to their API. That was written in Go; this one is written in C).