* Release 1.4. * (all): Updated the copyright years for 2008 on some of the files in the current release and added a copyright statement to any files previously lacking one. * LICENSE: Replaced the previous BSD-like license with the one used by the OpenBSD project (modeled after the Internet Software Consortium's, a two-clause BSD license removing language made unnecessary by the Berne convention); this new license is functionally identical to the old one, just more terse and openly recognized. * weather: Clarified function parameters in calls from the wrapper script to ease future ABI changes in the underlying module. * weather, weather.py: Some extra comments were added to the source, indentation style was updated from tab characters to three-space, and lines longer than 79 columns were refactored or otherwise split. * weather.1, weather.5, weather.py: Added an flines option to allow the maximum number of forecast output lines to be shortened. Added furl and murl options to allow overriding of the default current conditions and forecast data retrieval URLs. Added a headers option to allow overriding the default list of header names for current conditions data filtering. Added a quiet option to suppress the preamble lines and indentation for both current conditions and forecast output. * weather.py: Replaced the hardcoded fallback default METAR station ID and forecast city/state abbreviation with error messages to minimize confusion when necessary values are omitted. Adjusted a couple of hard-coded error message strings to be consistent with the output format of the option_parser module. Switched from urllib to urllib2 for retrieving data, providing a simpler means to detect and report retrieval errors. Upped the version to 1.4.
60 lines
1.8 KiB
Plaintext
60 lines
1.8 KiB
Plaintext
BASIC UNIX INSTALLATION INSTRUCTIONS FOR THE WEATHER UTILITY
|
|
|
|
Copyright (c) 2006-2008 Jeremy Stanley <fungi@yuggoth.org>.
|
|
Permission to use, copy, modify, and distribute this software is
|
|
granted under terms provided in the LICENSE file distributed with
|
|
this software.
|
|
|
|
|
|
PREREQUISITES
|
|
|
|
You need the Python interpreter installed somewhere in your path
|
|
(most modern UNIX derivatives come with one already). If you need to
|
|
get Python, it can be obtained from http://www.python.org/ (but
|
|
chances are your operating system at least provides some sort of
|
|
native package for it, which you should probably install in whatever
|
|
means is recommended by your OS vendor/distributor).
|
|
|
|
|
|
RUNNING IN PLACE
|
|
|
|
An easy way to try it out is to unpack the tarball and change to the
|
|
resulting directory:
|
|
|
|
tar xzf weather-*.tar.gz
|
|
cd weather
|
|
./weather --version
|
|
./weather --help
|
|
man ./weather.1
|
|
man ./weatherrc.5
|
|
./weather --forecast --no-conditions --city=charlotte --st=nc
|
|
./weather ord sea
|
|
|
|
...and so on. The weather utility, included Python module and
|
|
documentation are all fully functional when kept together in one
|
|
directory, if somewhat inconvenient.
|
|
|
|
|
|
INSTALLING THE UTILITY
|
|
|
|
The file named weather should be made executable and put somewhere
|
|
in your path (/usr/local/bin/ or ~/bin/ for example). Similarly,
|
|
weather.py needs to be somewhere in Python's include path. You can
|
|
see your Python interpreter's default include path by running:
|
|
|
|
python -c "import sys ; print sys.path"
|
|
|
|
|
|
CONFIGURATION
|
|
|
|
The weatherrc file should go in /etc/ or you can save it in your
|
|
home directory as a dotfile (~/.weatherrc) to support user-specific
|
|
alias configuration and overrides of the global /etc/weatherrc file.
|
|
|
|
|
|
MANUALS
|
|
|
|
Optionally, the weather.1 and weatherrc.5 files can be placed in
|
|
sane locations for TROFF/NROFF manual files on your system (for
|
|
example, /usr/local/share/man/ or ~/man/).
|