weather forecast in terminal

Forum rules
General talk about software - if the program is not in the repos, please links to the developer's page or github.
User avatar
vic
Godot
Posts: 2109
Joined: Wed Oct 17, 2012 10:11 am
Location: /bin

weather forecast in terminal

Unread post by vic » Sun May 31, 2015 5:59 am

I have not tried it. Just got a tip about it. Click and check link if you are interested. :)

https://github.com/schachmat/wego
Sorry guys, no signature for a while, too busy with life. :|

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: weather forecast in terminal

Unread post by machinebacon » Sun May 31, 2015 3:12 pm

Thanks Wickie!
Working Go environment
Well, I'll consider this some other time :D

I used to have this one: https://github.com/fcambus/ansiweather
Needs jq from the repos and a little bit of editing in the config file :)
..gnutella..

User avatar
Theo
CLIt Licker
Posts: 394
Joined: Wed Nov 11, 2015 10:19 pm
Location: Nieuw-Buinen, Netherlands

Re: weather forecast in terminal

Unread post by Theo » Sat Jan 09, 2016 11:52 pm

necrobump but...

inxi -xxxW cityname,country works for me :)

User avatar
daggoth
runs Stable
Posts: 36
Joined: Mon Mar 10, 2014 8:16 am

Re: weather forecast in terminal

Unread post by daggoth » Sun Jan 10, 2016 12:51 am

^^ Works for me! Didn't know that one.

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: weather forecast in terminal

Unread post by dkeg » Sun Jan 10, 2016 1:52 am

Oh, cool, worthy necro bump! I had to do city,state

Work hard; Complain less

User avatar
Dr_Chroot
Alfalfa
Posts: 1100
Joined: Mon Jun 09, 2014 9:49 pm
Location: among the sagebrush
Contact:

Re: weather forecast in terminal

Unread post by Dr_Chroot » Sun Jan 10, 2016 1:59 am

No kidding, this is pretty nice. At least from a quick glance at the man page, inxi does so much more than I knew about!
Fight internet censorship.
EFF | Tor Project | Bitcoin

"There have been times throughout American history where what is right is not the same as what is legal. Sometimes to do the right thing you have to break the law." - Edward Snowden

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: weather forecast in terminal

Unread post by pidsley » Sun Jan 10, 2016 2:07 am

Code: Select all

$ sudo apt-get install weather-util weather-util-data
$ weather $ weather atl
Current conditions at Hartsfield-Jackson Atlanta, GA
Last updated Jan 09, 2016 - 07:52 PM EST / 2016.01.10 0052 UTC
   Temperature: 50.0 F (10.0 C)
   Relative Humidity: 92%
   Wind: from the ESE (120 degrees) at 10 MPH (9 KT)
   Weather: light rain; mist
   Sky conditions: overcast
   Precipitation last hour: 0.08 inches
$ weather eddb
Searching via station...
[caching result Berlin-Schoenefeld, Germany]
Current conditions at Berlin-Schoenefeld, Germany (EDDB) 52-23N 013-31E 50M
Last updated Jan 09, 2016 - 07:50 PM EST / 2016.01.10 0050 UTC
   Temperature: 26 F (-3 C)
   Relative Humidity: 92%
   Wind: from the E (100 degrees) at 6 MPH (5 KT)
   Windchill: 19 F (-7 C)
"man weather" for more -- "weather -f <code>" for a forecast (only US codes), get codes from here or "weather --info" to search by name.

Code: Select all

$ weather --info beijing
Searching via name...
ICAO station code zbaa
----------------------
zbaa: Beijing, China
   (proximity ideal, 0km, 0mi)
$ weather zbaa
Current conditions at Beijing, China (ZBAA) 39-56N 116-17E 55M
Last updated Jan 09, 2016 - 08:00 PM EST / 2016.01.10 0100 UTC
   Temperature: 28 F (-2 C)
   Relative Humidity: 39%
   Wind: from the NNE (030 degrees) at 7 MPH (6 KT)
   Windchill: 21 F (-6 C)

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: weather forecast in terminal

Unread post by machinebacon » Sun Jan 10, 2016 5:02 am

^ excellent, thank you!

user@grill:~$ weather Paris
Searching via name...
Your search is too ambiguous, returning 107 matches.
user@grill:~$ weather Novosibirsk
Searching via name...
[using result Novosibirsk/Tolmach, RA]
Current conditions at <UNKNOWN>
Last updated Jan 10, 2016 - 12:00 AM EST / 2016.01.10 0500 UTC
Temperature: -14 F (-26 C)
Relative Humidity: 75%
Wind: Variable at 2 MPH (2 KT)
user@grill:~$

that's brilliant, it works well if the weather station has a unique name.
..gnutella..

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: weather forecast in terminal

Unread post by pidsley » Sun Jan 10, 2016 2:06 pm

You can also look up the station code for cities like Paris, and use that.

https://www.aviationweather.gov/docs/metar/stations.txt

Code: Select all

$ weather lfpb
Searching via station...
[caching result Paris / Le Bourget, France]
Current conditions at Paris / Le Bourget, France (LFPB) 48-58N 002-27E 65M
Last updated Jan 10, 2016 - 07:30 AM EST / 2016.01.10 1230 UTC
   Temperature: 46 F (8 C)
   Relative Humidity: 87%
   Wind: from the SSW (210 degrees) at 14 MPH (12 KT)
   Weather: Towering cumulus clouds observed
   Sky conditions: mostly cloudy
Or use the latitude and longitude to find the nearest station.

Code: Select all

$ weather "27-17S, 28-31E"                                                                                                                                                  
Searching via coordinates...
No NWS weather zone near 27-17S, 028-31E; forecasts unavailable.
Current conditions at Vereeniging, South Africa (FAVV) 26-34-29S 027-57-45E
Last updated Jan 10, 2016 - 08:00 AM EST / 2016.01.10 1300 UTC
   Temperature: 82 F (28 C)
   Relative Humidity: 34%
   Wind: from the NW (320 degrees) at 7 MPH (6 KT)

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: weather forecast in terminal

Unread post by machinebacon » Sun Jan 10, 2016 2:12 pm

the "Paris" search was on purpose, wanted to see what happens if there are definitely more than one stations. Thanks :)
..gnutella..

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: weather forecast in terminal

Unread post by pidsley » Sun Jan 10, 2016 2:14 pm

Oh! Sorry about that. I was caught up in the cool man page and all the options.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: weather forecast in terminal

Unread post by machinebacon » Sun Jan 10, 2016 2:25 pm

Nothing to feel sorry about :D I have never even considered/heard of weather-utils, so this is really a great tip!

The city I live in has a unique name, so it showed directly. Then I tried Stuttgart, which I knew has at least 2 stations. It lists three:

Code: Select all

user@grill:~$ weather stuttgart
Searching via name...
Your search is ambiguous, returning 3 matches:
   [edds] Stuttgart-Echterdingen, Germany
   [fips0567490] Stuttgart city, AR
   [ksgt] Stuttgart, Stuttgart Municipal Airport, AR, United States
Then I thought: let's check something more common - Paris sounds quite common to me :D Loving the forecast and alert options (yeah, I need the latter quite often~)

edit: can't find the sources of the Chinese Meteorological Institute, sigh. No forecast and alerts for me yet.
..gnutella..

User avatar
Theo
CLIt Licker
Posts: 394
Joined: Wed Nov 11, 2015 10:19 pm
Location: Nieuw-Buinen, Netherlands

Re: weather forecast in terminal

Unread post by Theo » Sun Jan 10, 2016 7:23 pm

^ Some of the airports are a bit of a help.
On https://en.wikipedia.org/wiki/List_of_airports_in_China is a list of airports and have 'ICAO' codes.
An example:

theo@theo-System-Product-Name:~$ weather zuck
Searching via station...
[caching result Chongqing, China]
Current conditions at Chongqing, China (ZUCK) 29-31N 106-29E 351M
Last updated Jan 10, 2016 - 01:00 PM EST / 2016.01.10 1800 UTC
Temperature: 46 F (8 C)
Relative Humidity: 93%
Wind: from the NW (320 degrees) at 4 MPH (4 KT)
Weather: light rain; mist
Sky conditions: overcast

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: weather forecast in terminal

Unread post by machinebacon » Sun Jan 10, 2016 7:42 pm

^ the problem is not the location name, they can be entered by normal city name. What I was referring to is: there are no forecast ("zone-forecast") and alerts for non-US locations on the METAR website.
..gnutella..

User avatar
noo_b_nomnoms
MILF
Posts: 522
Joined: Sat Jan 09, 2016 5:13 pm
Location: USA

Re: weather forecast in terminal

Unread post by noo_b_nomnoms » Tue Jan 12, 2016 2:33 am

bbq@hello:~ $ weather lax
Searching via airport...
[caching result Los Angeles Interntl Airport, CA, United States]
Current conditions at Los Angeles Interntl Airport, CA
Last updated Jan 11, 2016 - 07:53 PM EST / 2016.01.12 0053 UTC
Temperature: 59.0 F (15.0 C)
Relative Humidity: 53%
Wind: from the WSW (240 degrees) at 8 MPH (7 KT)
Sky conditions: mostly cloudy

This works nicely!
Sir! Put down the hammer and slowly step away from the computer.

Post Reply