From eb249a0ae2f1644a67d6231b7cddf292058080e7 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Tue, 25 Jul 2006 23:00:47 +0000 Subject: [PATCH] Imported from archive. * Release 1.3. * FAQ: Update to clarify that specifying an id won't automatically provide a city and st to get the accompanying forecast. * weather: Provided a consistent means for relocating weather.py to a private location; thanks to Mark Tran for pointing out a conflict with pyweather in ArchLinux (and presumably other distros as well). * weather.py: Upped the version to 1.3. --- FAQ | 24 ++++++++++++++++++++++++ weather | 8 +++++++- weather.py | 4 ++-- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/FAQ b/FAQ index 45ffcfd..ce7f213 100644 --- a/FAQ +++ b/FAQ @@ -4,6 +4,16 @@ Copyright (c) 2006 Jeremy Stanley , all rights reserved. Licensed per terms in the LICENSE file distributed with this software. +Table of Contents: + +1. Can I help? +2. How do I figure out my local METAR station ID? +3. How do I figure out my local city name and state abbreviation? +4. I live outside the USA--can this be made to work for me + anyway? +5. Why do I get the wrong forecast when specifying -i or --id? + + 1. Can I help? Sure! Bug reports and feature suggestions are always welcome, but @@ -42,3 +52,17 @@ likely to be published in a non-English language, requiring some additional input from speakers of that language for how to handle filtering and formatting of the text. + +5. Why do I get the wrong forecast when specifying -i or --id? + +The -i or --id switch (or the id parameter in an alias definition), +only tells weather(1) what current conditions to retrieve. If you +specify -f or --forecast on the command line (or forecast=True in +an alias) without providing a city name and state abbreviation +(-c/--city and -s/--st, or city and st in an alias), you will +instead see the forecast for the built-in default location (or the +city and st defined in the default alias, if you have one). See +question 3 above for information on figuring out what city name and +state abbreviation to use, and the manual for weatherrc(5) for +information on defining aliases. + diff --git a/weather b/weather index bf5129a..29ba2c3 100755 --- a/weather +++ b/weather @@ -1,11 +1,17 @@ #!/usr/bin/env python -# weather version 1.2, http://fungi.yuggoth.org/weather/ +# weather version 1.3, http://fungi.yuggoth.org/weather/ # Copyright (c) 2006 Jeremy Stanley , all rights reserved. # Licensed per terms in the LICENSE file distributed with this software. """Wrapper utility using the weather.py module.""" +# added so distributors can consistently specify a private module location +private_module_path = None +if private_module_path: + import sys + sys.path.insert(1, private_module_path) + import weather # initialize options and configs diff --git a/weather.py b/weather.py index 9d4b0e0..3ea1f54 100644 --- a/weather.py +++ b/weather.py @@ -1,10 +1,10 @@ -# weather.py version 1.2, http://fungi.yuggoth.org/weather/ +# weather.py version 1.3, http://fungi.yuggoth.org/weather/ # Copyright (c) 2006 Jeremy Stanley , all rights reserved. # Licensed per terms in the LICENSE file distributed with this software. """Contains various object definitions needed by the weather utility.""" -version = "1.2" +version = "1.3" class Selections: """An object to contain selection data.""" -- 2.11.0