Live data from Hacker News

ASCII Art Weather

wttr.in

101–106 of 106 posts

Re: ASCII Art Weather

#101

Made a small bash function for it. You can give the city as an argument and otherwise defaults to the env var $WEATHER_CITY and if that's not set, won't provide any city to the site which will result in the site guessing your location. weather() { if [ "$1" ] ; then city=$1 else city=$WEATHER_CITY fi curl http://wttr.in/$city }

As a quick aside, you can set default variables in bash with ${var-default}, so your function can be condensed to:

  weather()
  {
    curl http://wttr.in/${1-$WEATHER_CITY}
  }

Re: ASCII Art Weather

#102
post #53

Neat idea! The social buttons on the bottom kinda ruin the aesthetic, though (at least for me).

I like it :-) But I agree, social buttons should be removed or at least moved to page like /about.

Re: ASCII Art Weather

#104

It works in the Terminal, too! curl http://wttr.in/london

"This is a web frontend for a console weather application wego, using it as a backend." https://news.ycombinator.com/item?id=9545180

Setting up wego on a raspbian were a bit painful (go in aptitude is 1.3 while wego requires 1.5), the easiest way that works out of the box is simply running curl wttr.in/Localtion ;)

Re: ASCII Art Weather

#105

Earlier quoted context omitted.

>The site is also unusable on mobile, because ASCII art unlike proper semantic HTML is not easily rescalable by the browser. And it's inaccessible by users relying on screen readers, ironically because of all the ASCII cruft. As web developers, we're used to "everyone" being the audience, but that's not the case here. As a stylized visual representation of the weather, it's fine. I dig it. Making sure something is ac…

Oh, I agree that this is really cool in terms of aesthetics. I'm pointing out that the grandparent's comment about this being minimalistic, and comparing it to real weather apps as being absurd. If you're building a toy project aimed solely at programmers on desktop, there's a lot of things you don't have to care about. Some of those things are exactly the 'bloat' the grandparent has been complaining about.

The point wasn't necessarily this specific implementation. But the general concept of lightweight text web responses. Without several MB of JS, CSS, graphics aassets, etc.

Re: ASCII Art Weather

#106
post #28

Earlier quoted context omitted.

Yeah, because it's not showing the diagonal arrows.

If you have a font that supports proper monospaced unicode, it works: http://cl.ly/2f410i1k270D

Thanks for confirming. Can you share the font/fontname you are using? I would like to install it on my PC as well...

Update: Looks like they fixed it now. I just re-visited the site after posting this comment and see that there are new monospace arrows rendering in a properly aligned manner.

Post reply on HN