Live data from Hacker News

Curl Wttr.in

github.com

1–10 of 128 posts

Re: Curl Wttr.in

#4
I also like how you can add zipcodes or location names as a path and it returns that. At least it works with zipcodes, cities, airport codes, landmarks. Not sure what else.

Using this, I found out it was currently raining in Paris. And then saw that the thunder was rendered as emojis.

I wonder what other options there are... for example, I'm in the US, so it returns temperature in Fahrenheit even if I requested information about France. Are there options to change this?

But, all in all, this is really nice and polished.

Re: Curl Wttr.in

#7
post #4

I also like how you can add zipcodes or location names as a path and it returns that. At least it works with zipcodes, cities, airport codes, landmarks. Not sure what else. Using this, I found out it was currently raining in Paris. And then saw that the thunder was rendered as emojis. I wonder what other options there are... for example, I'm in the US, so it returns temperature in Fahrenheit even if I requested infor…

The README explains that you can get Celsius by appending `?m` to your query.

Re: Curl Wttr.in

#9
post #4

I also like how you can add zipcodes or location names as a path and it returns that. At least it works with zipcodes, cities, airport codes, landmarks. Not sure what else. Using this, I found out it was currently raining in Paris. And then saw that the thunder was rendered as emojis. I wonder what other options there are... for example, I'm in the US, so it returns temperature in Fahrenheit even if I requested infor…

There are quite a few options, it is pretty cool. You can check them out by hitting the :help endpoint[1].

I usually call it with a few of them to make the output cleaner, and without colors[2].

curl --compressed https://wttr.in/"$location"?QTAF

Where `$location` is either the location you want the weather for, or an IP address.

[1] https://wttr.in/:help

[2] https://git.sr.ht/~jamesponddotco/dotfiles/tree/master/.loca...

Re: Curl Wttr.in

#10
A good opportunity to remind everyone that we finally inboxed curl into Windows 10, so this works (with color output) from a stock Windows command prompt.

Better late than never, I hope.

Post reply on HN