| darkhorse.nu > weatherman |
weatherman displays weather information from weatherbug.com on the command line. It is written entirely in bash and will run on most UNIX/Linux systems.
The latest version of weatherman was released on January 12, 2013 with the following changes:
View CHANGES
Download weatherman-1.2.2.tar.gz
weatherman is also available on the Arch Linux AUR.
weatherman requires curl.
$ tar -zxvf weatherman-1.2.2.tar.gz
$ cd weatherman-1.2.2
# cp weatherman /usr/bin
# chmod a+x /usr/bin/weatherman
# cp weatherman.1.gz /usr/share/man/man1
If you are using OpenBSD, you will need to gunzip the manpage before copying it.
weatherman [options] LOCATION
Examples:
weatherman "Tokyo, Japan"
weatherman -e 77001
Options:
-m use metric units (Celcius, millibars, millimeters)
-e use English units (Fahrenheit, inches)
-x show extended forecast
-F FORMAT print output using specified format
-S set unit and location setting as defaults
-h display this help and exit
-v output version information and exit
$ weatherman "Tokyo, Japan" Current Conditions for Tokyo, Japan Reported by Tokyo (Haneda International Airport) @ Jan 13, 2013 12:00 PM Temp: 10 C Today: Mostly Sunny Tonight: Rain High: 10 C Wind Speed: ESE 13 Rain: 0.00mm Low: 1 C Gust: ESE 11 Rain/Month: 0.00mm Feels Like: 10 C Avg Wind: ESE 13 Sunrise: 6:50 AM Humidity: 47% Pressure: 1019.98mb Sunset: 4:48 PM Dew Point: -1 C Moonphase: New Data provided by WeatherBug.com
weatherman allows you to customize the output however you want with the -F option.
Each piece of data can be referenced with a sequence character. Escape sequences are also interpreted. NOTE: This option isn't usable with extended forecasts.
For example, if you only wanted to display the current temperature for Tokyo, Japan, you would use the following command:
$ weatherman -F'%c %u' "Tokyo, Japan"
A more detailed example followed by the resulting output:
$ weatherman -F'The high and low temps for %l are %T %u and %t %u with a humidity of %h%%' "Tokyo, Japan"
The high and low temps for Tokyo, Japan are 17 C and 16 C with a humidity of 63%
See the manpage for a list of available sequence characters.
© 2013 darkhorse.nu. All rights reserved