Coder Social home page Coder Social logo

wu's Introduction

Wu

Version 3.9.7

wu is a small, fast command-line application that retrieves weather data from Weather Underground.

Description

To use wu, 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 wu root directory as "condrc")

wu has the following major options:

  • --conditions reports the current weather conditions.

  • --forecast gives the current (3-day) forecast.

  • --forecast10 gives the current (10-day) forecast.

  • --alerts reports any active weather alerts.

  • --lookup [STATION] allows you to determine the codes for the various weather stations in a particular area. The format for STATION is the same as that for the -s switch below.

  • --astronomy reports sunrise, sunset, and lunar phase.

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

  • --yesterday gives detailed almanac information for the previous day.

  • --history=YYYYMMDD gives detailed almanac information for a given day.

  • --planner=MMDDMMDD gives averages for travel planning (30-day max).

  • --tides reports tidal data (when available).

  • --all generate all reports (useful for creating custom reports and for mollifying the truly weather-crazed).

All twelve options can be accompanied by the -s switch, which can be used to override the default location in .condrc. The argument passed to -s can be a "city, state-abbreviation/country", a (U.S. or Canadian) zip code, a 3- or 4-letter airport code, or "lat,long".

wu also has two additional switches that provide information about the program:

  • --help
  • --version

By itself, the wu command will show the current conditions.

Compiling and Installing Wu

Wu is written in the Go programming language (version 1.0 or later). If you don't have a Go compiler, you'll need to install one. Detailed instructions are here.

To obtain the source code for wu:

git clone git://github.com/sramsay/wu.git

To compile the wu executable, type:

go build

To compile and install the excutable type:

go install

(this will install it at the location specified by the GOPATH variable).

Wu should work on any system that can compile Go programs.

You may find the following aliases useful:

alias conditions='wu'
alias forecast='wu -forecast'
alias forecast10='wu -forecast10'
alias alerts='wu -alerts'
alias astronomy='wu -astro'
alias yesterday='wu -yesterday'
alias almanac='wu -almanac'
alias tides='wu -tides'
alias slookup='wu -lookup'

License(s)

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

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

Wu was heavily inspired by Jeremy Stanley's weather. This is a lovely Python script that has more-or-less the same output format as wu. 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.

wu's People

Contributors

ajstarks avatar

Watchers

Justin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.