Skip to content

ajstarks/conditions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conditions

Version 2.0.1.

Conditions is a suite of small command-line applications that retrieve weather data from Weather Underground. The programs are designed to be extremely fast and generally conformant with the UNIX philosophy.

Description

Conditions consists of six command-line applications.

  • conditions reports the current weather conditions.

  • forecast gives the current forecast.

  • alerts reports any active weather alerts.

  • slookup allows you to determine the codes for the various weather stations in a particular area.

  • astronomy reports sunrise, sunset, and lunar phase.

  • almanac reports average high and low temperatures, as well as record temperatures for the day.

All six commands understand the following switches:

  • -s location (which can be a "city, state-abbreviation/country", a (U.S. or Canadian) zip code, a 3- or 4-letter airport code, or "lat,long").
  • -h help
  • -V version

To use conditions, you need to obtain an API key from Weather Underground http://www.wunderground.com/weather/api/. You should then add that key and the name of your default weather station to $HOME/.condrc:

{
  "key": "YOUR_API_KEY",
  "station": "Lincoln, NE"
}

(the above is available in the conditions root directory as "condrc")

Building Conditions

Conditions is written in Go, and thus requires a working Go compiler. Assuming you have one of those:

cd conditions/src
make

If you don't have one of those, you'll need to install it. Detailed instructions are here. But in brief:

hg clone -u release https://go.googlecode.com/hg/ go
cd go/src
./all.bash
export GOROOT=/path/to/go
export GOARCH=amd64
export GOOS=linux
export PATH=${GOROOT}/bin:$PATH

(substituting 386 for amd64, and darwin|freebsd for linux as appropriate).

Then proceed with the above.

License(s)

Conditions is written and maintained by Stephen Ramsay (sramsay{dot}unl{at}gmail{dot}com).

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Data courtesy of Weather Underground, Inc. (WUI) is subject to the Weather Underground API Terms and Conditions of Use. The author of this software is not affiliated with WUI, and the software is neither sponsored nor endorsed by WUI.

Thanks

Conditions was heavily inspired -- and indeed, might be considered a clean-room implementation of -- Jeremy Stanley's weather. This is a lovely Python script that has more-or-less the same output format as conditions. I reimplemented the system because Stanley's had stopped working (for me) and I wanted a program that was faster. I also wanted a system that takes advantage of Weather Underground's rich, JSON API.

About

A fast command line weather app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages