Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 100 lines (58 sloc) 4.106 kB
ba2e995 @sramsay Added markdown README.
authored
1
0ab2d93 @sramsay Updated README.
authored
2 Wu
ba2e995 @sramsay Added markdown README.
authored
3 ==========
4
0bbac63 @sramsay Version bump.
authored
5 Version 3.2.0.
20f5a9e @sramsay Updated README.
authored
6
29901f1 @sramsay Updated README.
authored
7
0ab2d93 @sramsay Updated README.
authored
8 Wu is a fast small command-line application that retrieves weather data from [Weather Underground](http://www.wunderground.com).
ba2e995 @sramsay Added markdown README.
authored
9
10 Description
11 -----------
12
ebc2969 @sramsay Modifications to README.
authored
13 To use Wu, you need to obtain an API key from Weather Underground [http://www.wunderground.com/weather/api/](http://www.wunderground.com/weather/api/). You should then add that key and the name of your default weather station to $HOME/.condrc:
ba2e995 @sramsay Added markdown README.
authored
14
0ab2d93 @sramsay Updated README.
authored
15 {
16 "key": "YOUR_API_KEY",
17 "station": "Lincoln, NE"
18 }
ba2e995 @sramsay Added markdown README.
authored
19
ebc2969 @sramsay Modifications to README.
authored
20 (the above is available in the Wu root directory as "condrc")
ba2e995 @sramsay Added markdown README.
authored
21
0ab2d93 @sramsay Updated README.
authored
22 Wu has the following major options:
ba2e995 @sramsay Added markdown README.
authored
23
0ab2d93 @sramsay Updated README.
authored
24 * _--conditions_ reports the current weather conditions.
c5cdb28 @sramsay Updates README.
authored
25
0ab2d93 @sramsay Updated README.
authored
26 * _--forecast_ gives the current forecast.
c5cdb28 @sramsay Updates README.
authored
27
0ab2d93 @sramsay Updated README.
authored
28 * _--alerts_ reports any active weather alerts.
ba2e995 @sramsay Added markdown README.
authored
29
ebc2969 @sramsay Modifications to README.
authored
30 * _--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.
ba2e995 @sramsay Added markdown README.
authored
31
0ab2d93 @sramsay Updated README.
authored
32 * _--astronomy_ reports sunrise, sunset, and lunar phase.
29901f1 @sramsay Updated README.
authored
33
0ab2d93 @sramsay Updated README.
authored
34 * _--almanac_ reports average high and low temperatures, as well as record temperatures for the day.
29901f1 @sramsay Updated README.
authored
35
0ab2d93 @sramsay Updated README.
authored
36 * _--yesterday_ reports detailed alamanac information for the previous day.
ebc2969 @sramsay Modifications to README.
authored
37
38 * _--all_ generate all reports (useful for creating custom reports and for mollifying the truly weather-crazed).
0ab2d93 @sramsay Updated README.
authored
39
40 All six commands understand 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").
41
42 Wu also has two additional switches that provide information about the program:
43
44 * -h help
45 * -V version
aa60d9f @sramsay ...
authored
46
ebc2969 @sramsay Modifications to README.
authored
47 Installing Wu
48 -----------
ba2e995 @sramsay Added markdown README.
authored
49
ebc2969 @sramsay Modifications to README.
authored
50 The easiest way to install Wu (assuming you have both [Git](http://git-scm.com/) and a Go compiler) is to type:
0ab2d93 @sramsay Updated README.
authored
51
ebc2969 @sramsay Modifications to README.
authored
52 GOPATH=[PATH] goinstall -u github.com/sramsay/wu/wu
0ab2d93 @sramsay Updated README.
authored
53
ebc2969 @sramsay Modifications to README.
authored
54 where [PATH] is the directory you'd like it installed (e.g. /usr/local/bin).
ba2e995 @sramsay Added markdown README.
authored
55
0ab2d93 @sramsay Updated README.
authored
56 If you don't have a Go compiler, you'll need to install one. Detailed instructions are [here](http://golang.org/doc/install.html). But in brief:
aa60d9f @sramsay ...
authored
57
58 hg clone -u release https://go.googlecode.com/hg/ go
68b4e4d @sramsay Updated README.
authored
59 cd go/src
60 ./all.bash
61 export GOROOT=/path/to/go
62 export GOARCH=amd64
63 export GOOS=linux
64 export PATH=${GOROOT}/bin:$PATH
aa60d9f @sramsay ...
authored
65
66 (substituting 386 for amd64, and darwin|freebsd for linux as appropriate).
67
ebc2969 @sramsay Modifications to README.
authored
68 Building Wu from Source
69 -----------------------
70
71 To obtain the source code for Wu:
72
73 git clone git@github.com:sramsay/wu.git
74
75 To compile:
76
77 cd wu/wu
78 make
79 GOPATH=/usr/local/bin make install
80
81 Wu should work on any system that can compile Go programs.
aa60d9f @sramsay ...
authored
82
ba2e995 @sramsay Added markdown README.
authored
83 License(s)
84 ---------
85
0ab2d93 @sramsay Updated README.
authored
86 Wu is written and maintained by [Stephen Ramsay](http://lenz.unl.edu/) (sramsay{dot}unl{at}gmail{dot}com) and [Anthony Starks](http://mindchunk.blogspot.com/).
ba2e995 @sramsay Added markdown README.
authored
87
88 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.
89
90 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.
91
1b0cfb7 @sramsay Minor alterations to README.
authored
92 You should have received a copy of the GNU General Public License along with this program. If not, see [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).
ba2e995 @sramsay Added markdown README.
authored
93
1b0cfb7 @sramsay Minor alterations to README.
authored
94 Data courtesy of Weather Underground, Inc. (WUI) is subject to the [Weather Underground API Terms and Conditions of Use](http://www.wunderground.com/weather/api/d/terms.html). The author of this software is not affiliated with WUI, and the software is neither sponsored nor endorsed by WUI.
ba2e995 @sramsay Added markdown README.
authored
95
96 Thanks
97 ------
98
ebc2969 @sramsay Modifications to README.
authored
99 Wu was heavily inspired by Jeremy Stanley's [weather](http://fungi.yuggoth.org/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](http://www.json.org/) API.
Something went wrong with that request. Please try again.