3 # Copyright (c) 2006 Jeremy Stanley <fungi@yuggoth.org>, all rights reserved.
4 # Licensed per terms in the LICENSE file distributed with this software.
8 # initialize options and configs
9 selections = weather.Selections()
11 get_boolean = selections.get_boolean
13 # this mode just lists the aliases defined in the config
14 if get_boolean("list"): print weather.list_aliases(selections.config)
18 for argument in selections.arguments:
19 if get_boolean("conditions", argument):
20 print weather.get_metar(
22 get_boolean("verbose", argument)
24 if not get_boolean("conditions", argument) \
25 or get_boolean("forecast", argument):
26 print weather.get_forecast(
27 get("city", argument),
29 get_boolean("verbose", argument)