Live data from Hacker News

Curl Wttr.in

github.com

71–80 of 128 posts

Re: Curl Wttr.in

#71

This is one of those services that I love when I find them, use extensively for the next 30 minutes and forget about. But I keep coming back to it! I even spent a time to make a simple function in my shell to cut off the output after today and accept a location name w () { curl -s "wttr.in/$1?M1q" | head -17 } and then I can just do w london to get the weather for London today. But, like most of the functions/aliases…

You could do something like this

  w () {
    curl -s "wttr.in/${*// /+}"
  }
to make it work with places that have spaces in their name. E.g.

  w new york

Re: Curl Wttr.in

#72
post #35

I use this all the time. I find this option pretty neat: curl wttr.in/Moon Shows current lunar phase. I use Termux[0] on my phone with curl installed. Pretty handy. Also, check out rate.sx[1] from the same author: curl rate.sx Shows information about current exchange rates of cryptocoins. More similar console services: https://github.com/chubin/awesome-console-services [0]: https://termux.com/ [1]: https://github.com…

shameless plug: https://e.xec.sh

heh... visited that link and tried it; then I remembered that I sit behind a proxy. Guess what happens when a proxy first caches the entire responwe of that page and then sends it to the client all at once? :D

Re: Curl Wttr.in

#73

This is one of those services that I love when I find them, use extensively for the next 30 minutes and forget about. But I keep coming back to it! I even spent a time to make a simple function in my shell to cut off the output after today and accept a location name w () { curl -s "wttr.in/$1?M1q" | head -17 } and then I can just do w london to get the weather for London today. But, like most of the functions/aliases…

You could do something like this w () { curl -s "wttr.in/${*// /+}" } to make it work with places that have spaces in their name. E.g. w new york

Just use IFS for this

w() { ( IFS=+; curl wttr.in/"$*";); }

Re: Curl Wttr.in

#76

Earlier quoted context omitted.

Oops, don't know how I missed that. Sorry!

To say truth, it is not just a wego as a service since many years, but is started like that indeed Now it has a lot of additional features: * one-line output for status lines * astronomical information * translation to 70+ languages * geolocation * full fledged multilingual location search * HTML frontend * PNG frontend * Slack support * scalable architecture (it handles 10M+ queries daily for the moment of writing,…

Nice ! Did you contribute back your improvements to wego ?

Re: Curl Wttr.in

#79
post #76

Earlier quoted context omitted.

To say truth, it is not just a wego as a service since many years, but is started like that indeed Now it has a lot of additional features: * one-line output for status lines * astronomical information * translation to 70+ languages * geolocation * full fledged multilingual location search * HTML frontend * PNG frontend * Slack support * scalable architecture (it handles 10M+ queries daily for the moment of writing,…

Nice ! Did you contribute back your improvements to wego ?

No, because they are not implemented as a part of wego; wego is used just for visualization of one of the views (v1). The rest is implemented outside of it

Re: Curl Wttr.in

#80
post #75

Has nobody mentioned, that this is just wego as a service?

What is wego? Google only seems to give me travel companies and alternatives.

I didn't know either! Searching for "wego weather" shows this CLI: https://github.com/schachmat/wego

Reading the readme for chubin/wttr.in also clarifies what "wego" is:

> wttr.in uses wego for visualization and various data sources for weather forecast information.

"wego" in that sentence is also linked to schachmat/wego so seems to confirm is that one.

Post reply on HN