
Weather in your terminal, with ANSI colors and Unicode symbols - fcambus
https://github.com/fcambus/ansiweather
======
mafro
Obligatory reference to the awesome Powerline[1]. If you don't want to use
Python there's also tmux-powerline[2] and vim-airline[3].

I've been using these for the last couple of years.

[1]
[https://github.com/Lokaltog/powerline](https://github.com/Lokaltog/powerline)

[2] [https://github.com/erikw/tmux-powerline](https://github.com/erikw/tmux-
powerline)

[3] [https://github.com/bling/vim-airline](https://github.com/bling/vim-
airline)

EDIT: typo, spacing and autocorrect :/

------
burntsushi
I put ansiweather in the AUR[1] for Archlinux users.

[1] - [https://aur.archlinux.org/packages/ansiweather-
git/](https://aur.archlinux.org/packages/ansiweather-git/)

~~~
RexRollman
Thank you kind Sir!

------
mikestew
We're dyin' over here in the Seattle area: Current weather in Redmond =>
282.77 °F

Maybe try metric? Current weather in Redmond => 282.77 °C

Perhaps it doesn't know about Redmond, WA. Let's try Seattle: Current weather
in Seattle => 286.5 °F

It also seems to think it's sunny in Seattle right now. Umm, no.

EDIT: ah, no space after the comma in your location, otherwise it thinks
you're on the surface of Venus.

~~~
chinpokomon
The weather service reports the temperature in Kelvin.

~~~
joshvm
Then why does Moscow report at -2? Russia's gotten so cold it's below absolute
zero..

The comma edit does the trick.

------
guylhem
I am thinking more and more about moving back to a text-only interface -
previously I was very happy with mutt, tin, lynx (and links and w3m),
centericq, etc, but only bash and vim stuck with me.

Yet with the advent of unicode, there are fewer needs for a graphical
interface - stay for a weather app. A clutter-free desktop consisting of
mostly bash, along with gnu screen (or the likes) and ssh (or the likes) to
remotely connect to home, now that would be efficient!

Even better - a few weeks ago, I found out that for math stuff, stata on OSX
can be used with a command-line.

[PS: As usual Frederic, totally awesome :-)]

~~~
zokier
>Yet with the advent of unicode, there are fewer needs for a graphical
interface - stay for a weather app

Of course the line between graphical and text-only is blurry. I'd argue that
even small inline graphics are still graphics and thus not text- _only_ , no
matter how they are technically implemented (unicode or some "real" graphics).

Personally I don't think we have to resort for using the unholy mixture of 70s
and todays tech that console apps represent to get clutter-free desktop
experience. More importantly I think we could get even more clean interfaces
using full graphical capabilities if we'd get a good design
ideology/guidelines to build upon. Just because mainstream GUI apps are stuck
on WIMP idea doesn't mean that it would be the only way to approach GUI.

~~~
jlgreco
As far as I can tell, only modern equivalent of the terminal _(a generic input
/output device/program that can be used as the standard front end to an
endless array of applications)_ that has gained any appreciable traction is
the web browser. Any "modern terminal, but not actually a terminal"
experience, using current tech, is going to be built on top of a web browser.

The browser is just the terminal though _(which to be fair is a large piece of
the puzzle)_ ; we still don't have the shell analog. The inadequacy of
ChromeOS does not make me hopeful. ChromeOS is to the browser what midnight
commander is to the terminal.

~~~
siddboots
> Any "modern terminal, but not actually a terminal" experience, using current
> tech, is going to be built on top of a web browser.

You're describing Steven Wittens' TermKit proof-of-concept:
[http://acko.net/blog/on-termkit/](http://acko.net/blog/on-termkit/)

------
bhickey
For April Fools' I released cloudyfs -- weather reports in your file system.
Its pretty primitive, but functional. Pardon my haskell, it's lousy.

[http://github.com/bhickey/cloudyfs](http://github.com/bhickey/cloudyfs)

------
jimktrains2

         % cat ~/.ansiweatherrc
         location:Pittsburgh,Pa
         units:metric
    
         jim@lilly /home/jim/projects/external/ansiweather (master)[0] {+00% 58C} Mon 2013-10-21 15:39:50 0                                         
         % ./ansiweather       
          Current weather in Pittsburgh => 17.68 °C ☀  - Humidity => 33 % - Pressure => 1014 hPa 
        jim@lilly /home/jim/projects/external/ansiweather (master)[0] {+00% 59C} Mon 2013-10-21 15:39:52 0                                         
         % cat ~/.ansiweatherrc
         location:Pittsburgh,Pa
         units:imperial
    
         jim@lilly /home/jim/projects/external/ansiweather (master)[0] {+00% 58C} Mon 2013-10-21 15:40:00 0                                         
         % ./ansiweather       
          Current weather in Pittsburgh => 61.89 °F ☀  - Humidity => 47 % - Pressure => 985.97 hPa
    

Interesting that the humidity and pressure are different when using different
units (err, the humity and pressure are in the same units regardless of the
units setting, but the values are different).

~~~
mappu
Given that 17.68 C is only 63.83 F, i think you just hit two different data
points.

~~~
jimktrains2
That's my point. When you switch which units are used 2 different data points
are used. (Though, I didn't say it that clearly.)

I didn't even think to convert the temp though, good call.

------
blueblob
Did not work for me with the default .ansiweatherrc. I had to remove the
fetch_cmd:... and use curl -s instead and then it worked.

[https://github.com/fcambus/ansiweather/issues/3](https://github.com/fcambus/ansiweather/issues/3)

Thanks for this, I had written a script to pull the weather from another site
and placed it in my conky. It works but is quite ugly.

------
donpdonp
./ansiweather: line 76: jq: command not found

If you run into that on ubuntu, there does not appear to be an ubuntu package
for jq. Binaries and source are available at
[http://stedolan.github.io/jq/download/](http://stedolan.github.io/jq/download/)

~~~
ihuman
If you are on OS X and use Homebrew, install with 'brew install jq'

~~~
markwakeford
There is also prebuilt OSX binaries,
[http://stedolan.github.io/jq/download/](http://stedolan.github.io/jq/download/)

------
kawsper
How often does it make a http request? Every time PS1 is printed?

~~~
blueblob
If you put it in your PS1 then it will make a request every time your PS1 is
printed, but it shouldn't be hard to have it cache and check timestamps.

------
donretag
The author obviously does not live in California. I rarely check the weather
since I know that it will be more or less the same as yesterday , or the day
before, or the day before that...

~~~
JSno
After I moved out of LA, I realized there is a thing called weather forecast.

~~~
lttlrck
I guess that helped with the smog forecast withdrawal.

------
nilved
I realize this is a weird question, but I've never understood the point of
having an applet show you the current weather. Does your home have no windows?

~~~
burntsushi
That's an interesting question that I hadn't really thought about before.
Aside from just being generally curious about the exact weather conditions,
here are some things that I use it for:

1\. I live in a small apartment, so during the humid summers in New England
with computer equipment running, it stays consistently hot. The A/C is running
more often than not. In those cases, it's nice to get a quick gauge of the
temperature/humidity. For example, it might guide me in whether I want to have
a cigar in the evening.

2\. I find it useful to ascribe a quantitative value to weather like
temperature, since it gives me an idea of what I need to wear if I'm going to
be outside for any length of time. e.g., low 50s I can get by comfortably at
an idle position with shorts, shoes and a sweatshirt, but low 40s requires
pants to stay comfortable. It can be difficult to tell that by just stepping
outside for a few seconds...

Sorry about the long-winded response, but your question was curiously
provocative!

------
xradionut
Most of us weather/radio nuts in the US have been doing something similar for
over a decade or more. There's several scripts written in Perl or Python that
grab data from NOAA. (Or you can just program your ICOM with the local
frequency and script it to respond to the CLI...)

------
troels
I need this as an emacs extension. Would fit right next to my nyan cat
progress bar.

~~~
aaronem
And now you can have it there! [https://github.com/aaron-
em/weatherline.el](https://github.com/aaron-em/weatherline.el)

------
devindotcom
Ack! I love this, so lightweight. I don't mean to do a pony request here, but
can anyone think of an easy way to get this into a garden-variety windows 7
desktop, like through a rainmeter script or news ticker?

~~~
a3n
Not what you asked, but Win7 has a desktop weather gadget.

More along the lines that you asked ...

\- Install cygwin and run it in a bash terminal there. Probably some tweaking
required, may or may not work. cygwin's minterm does display unicode.

\- Translate it into python and run it from a dos terminal (or from cygwin). I
don't think the regular cmd.exe or powershell will display unicode (I could be
wrong), but a replacement like conemu does (just checked). If you like this
weather thing you'll like conemu better anyway.

------
aw3c2
Alternatively,
[http://robobunny.com/projects/weatherspect/html/](http://robobunny.com/projects/weatherspect/html/)
;)

------
jmptable
Reminds me of a project a friend of mine did recently for the hackMIT
hackathon:
[http://hackmit.challengepost.com/submissions/18025-bashwunde...](http://hackmit.challengepost.com/submissions/18025-bashwunderground-b8)
Has ASCII-art, but I don't think he's put the source up anywhere.

------
mVChr
This is great!

I just made a pull request to add the ability to see the forecast for the
upcoming week as well:
[https://github.com/fcambus/ansiweather/pull/11/files](https://github.com/fcambus/ansiweather/pull/11/files)

------
jstalin
I had to use an underscore for a space in my city name in the config file. It
would be nice if it linked to the list of city names available. But I think
the program is pretty awesome!

~~~
dubcanada
Go to [http://openweathermap.org](http://openweathermap.org) and find your
city, then copy the name it says.

------
laureny
Great to see the weather in the title bar of my xterm, I often don't have the
strength to look out the window.

------
Wilya
Nice idea !

Now I can have a weather icon in my prompt.

------
AsymetricCom
Disappointed

    
    
         _( )_          _     
       _(     )_      _( )_
      (_________)   _(     )_
        \  \  \    (_________)
          \  \       \  \  \
                       \  \

