projects
/
weather.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported from archive.
[weather.git]
/
weather
diff --git
a/weather
b/weather
index
ffaf2a5
..
bf5129a
100755
(executable)
--- a/
weather
+++ b/
weather
@@
-1,31
+1,34
@@
-#!/usr/bin/python
+#!/usr/bin/
env
python
+# weather version 1.2, http://fungi.yuggoth.org/weather/
# Copyright (c) 2006 Jeremy Stanley <fungi@yuggoth.org>, all rights reserved.
# Licensed per terms in the LICENSE file distributed with this software.
# Copyright (c) 2006 Jeremy Stanley <fungi@yuggoth.org>, all rights reserved.
# Licensed per terms in the LICENSE file distributed with this software.
+"""Wrapper utility using the weather.py module."""
+
import weather
# initialize options and configs
selections = weather.Selections()
get = selections.get
import weather
# initialize options and configs
selections = weather.Selections()
get = selections.get
-get_bool
ean = selections.get_boolean
+get_bool
= selections.get_bool
# this mode just lists the aliases defined in the config
# this mode just lists the aliases defined in the config
-if get_bool
ean
("list"): print weather.list_aliases(selections.config)
+if get_bool("list"): print weather.list_aliases(selections.config)
# normal operation
else:
for argument in selections.arguments:
# normal operation
else:
for argument in selections.arguments:
- if get_bool
ean
("conditions", argument):
+ if get_bool("conditions", argument):
print weather.get_metar(
get("id", argument),
print weather.get_metar(
get("id", argument),
- get_bool
ean
("verbose", argument)
+ get_bool("verbose", argument)
)
)
- if not get_bool
ean
("conditions", argument) \
- or get_bool
ean
("forecast", argument):
+ if not get_bool("conditions", argument) \
+ or get_bool("forecast", argument):
print weather.get_forecast(
get("city", argument),
get("st", argument),
print weather.get_forecast(
get("city", argument),
get("st", argument),
- get_bool
ean
("verbose", argument)
+ get_bool("verbose", argument)
)
)