• 9 days ago
Only HN can be so critical of what is a really cool project.
Honestly this is a great _simple_ way to access weather without leaving my terminal. Love the basic ASCII graphics.
I noticed it's a LOT faster when I provide the city, probably because it doesn't have to look it up from IP:
``` curl wttr.in/atlanta ```
Nice work.
Replythis is really nice, i like the rendering and simplicity. it's aesthetically pleasing. overall 10/10 experience.
ReplyIf only there's a $PS1 version
Replycool widget but sucks on a mac where default background is white. yellow stuff is almost invisible.
ReplyCute idea!
ReplyThis is a really nice service and I have used it for quite some time. Just a small reminder; to relieve the wttr servers, please cache the results on disk if you for example want to have a higher refresh rate on your tmux status bar.
See my dotfiles repo [1] if you're interested in such implementation
[1] https://github.com/Granddave/dotfiles/tree/master/tmux
Replyinterop done the right way: this guy is going to be in trouble with the web javascript kiddies.
Yes, if this guy is a state-sponsored computer security hacker, he could pown the 3, maybe 4, ppl (and I am one of them) using its http services via curl and our terminals or image format parsers or etc. Is this worth for that many ppl?
Anyways, that's too sexy, I am willing to take the bait.
That said, I could use an official/trusted online source for the weather information and format it myself (I guess I would get a CSV or json or xml file).
ReplySo I do a basic `curl wttr.in` and I get back a line "Weather report: not found" followed however, by what appears to be a full weather report. Two things:
1. Either give me an error and exit, or warn me about something meaningful 2. Show me the location of the weather report, as it stands I'm left guessing
Otherwise, it's nice to see people making simple text interfaces for important data like this.
ReplyI wonder how far you could push the web into this mode.
Everything in tiny ascii strips. Even shopping, or other needs. A challenge in cute minimalism (not crippled).
ReplyI have to scroll all they way down to the buttom to find the information source -- WorldWeatherOnline. Does people not care about where their whether data is sourced from?
Living in Japan, I have always been wary of these type of service, since I find a lot of them really inaccurate. And I just checked, Tokyo show 15C on that website, while high resolution current weather information from Japan Metrological Agency show 18C.
ReplyIgor created several great cli projects like cheat.sh[1], late.nz[2], QRenco.de[3],rate.sx[4]
Also, he maintains the awesome-console-services[5] list
[1] https://github.com/chubin/cheat.sh
[2] https://github.com/chubin/late.nz
[3] https://github.com/chubin/qrenco.de
[4] https://github.com/chubin/rate.sx
[5] https://github.com/chubin/awesome-console-services
ReplyA very fun way to have this, tmux status bar weather! `set -g status-left '#(curl "wttr.in/YourTown?u&format=3")'`. This way you can always see the latest :)
ReplyA nice idea but it gives the wrong info for Spokane, WA, USA
ReplyThis is really neat...
vim ~/.bashrc
``` alias weather='/usr/bin/curl wttr.in' ``` :wq
and now:
weather
ReplyI simply use the ansiweather app [0] through an alias in the terminal...
[0]: https://github.com/fcambus/ansiweather
ReplyI'm a little amused by its weather report classifying the night as "Sunny", when it probably just means the sky will be clear.
ReplyRemember with this kind of thing you're trusting the remote site with access to your terminal emulator. There have been various security problems with some more advanced terminals and escape sequences in the past[1][2].
Personally I think it's a cute thing and have implemented some similar little easter eggs to this via: curl ip.wtf/moo
[1]: https://blog.mozilla.org/security/2019/10/09/iterm2-critical... [2]: https://packetstormsecurity.com/files/162621/rxvt-2.7.0-rxvt...
Replyso the obvious (for me) thing to try was:
watch -n 600 -c 'curl -s v2.wttr.in/'
This ALMOST works, but somehow it messes up the formatting for me. For some reason watch doesn't pass through formatting cleanly or so?
ReplySeems like it breaks when it can't find the geo-location, it says "Weather report: not found" but still shows the weather forecast from... somewhere?
Replyin ~ 2016 I built a plugin for on-my-fish to simplify the process of curling wttr.in https://github.com/oh-my-fish/plugin-wttr. From today I'm still using this plugin a lot. Checking out the weather on your terminal turns out to be faster than open a weather website or unlock my phone and check in out a weather app.
ReplyMy little custom command (HN formatting break it all so need to be nicely formatted again).
alias weather=weather function weather() { if [ $# -le 2 ]; then Command="wttr.in/$1" if [ $# -eq 2 ]; then Command="$Command,$2" fi fi Command="curl ${Command// /%20}" eval $Command }
ReplyIn the USA, I like the National Weather Service direct APIs. I wish I could get more granular forecast data, both in time and space, but they forecast dewpoint/humidity, which is really nice.
ReplyI get "Weather report: not found" on the first line and then a 3 day forecast for idk what location.
ReplyLove it. Was expecting maybe one limited end-point and was scrolling 5mins through all the features. Very cool
ReplyThat is very lovely. Well done!
ReplyI've had this shell function / alias set up for years:
weather () {
curl "https://wttr.in/${1}"
}
This lets you run: weather nyc, a zip code and everything else wttr.in supports.Reply More cool console services like this one: https://github.com/chubin/awesome-console-services
curl wttr.in/Moon
Shows moon phases curl rate.sx
Shows cryptocurrency exchange rates, from the same author as wttr.inI sourced the above commands from a previous HN post: https://news.ycombinator.com/item?id=23646953
ReplyI'm going to add that if you live in Norway, YR has nice weather data available for free (required by law). Shameless plug for my little CLI tool when I was beginning to learn go:
https://github.com/sigg3/weather_query/
ReplyThere's also `curl v2.wttr.in`, but imho I like the original better.
Replysite design / logo © 2022 Box Piper