Weather: update documentation of config options

This commit is contained in:
James Lu 2015-03-10 17:14:31 -07:00
parent b06e59341e
commit bea95b27c3

View File

@ -17,21 +17,31 @@ def configure(advanced):
from supybot.questions import expect, anything, something, yn
conf.registerPlugin('Weather', True)
Weather = conf.registerPlugin('Weather')
conf.registerGlobalValue(Weather,'apiKey', registry.String('', ("""Your wunderground.com API key."""), private=True))
conf.registerChannelValue(Weather,'useImperial', registry.Boolean(True, ("""Use imperial units? Defaults to yes.""")))
conf.registerChannelValue(Weather,'disableColoredTemp', registry.Boolean(False, """If True, this will disable coloring temperatures based on values."""))
# conf.registerChannelValue(Weather,'useWeatherSymbols', registry.Boolean(False, """Use unicode symbols with weather conditions and for wind direction."""))
conf.registerGlobalValue(Weather,'forecast', registry.Boolean(True, ("""Display forecast in output by default?""")))
conf.registerGlobalValue(Weather,'alerts', registry.Boolean(False, ("""Display alerts by default?""")))
conf.registerGlobalValue(Weather,'almanac', registry.Boolean(False, ("""Display almanac by default?""")))
conf.registerGlobalValue(Weather,'astronomy', registry.Boolean(False, ("""Display astronomy by default?""")))
conf.registerGlobalValue(Weather,'showPressure', registry.Boolean(False, ("""Show pressure in output?""")))
conf.registerGlobalValue(Weather,'showWind', registry.Boolean(False, ("""Show wind in output?""")))
conf.registerGlobalValue(Weather,'showUpdated', registry.Boolean(False, ("""Show updated in output?""")))
conf.registerChannelValue(Weather,'showImperialAndMetric', registry.Boolean(True, ("""In channel, display output with Imperial and Metric?""")))
conf.registerGlobalValue(Weather,'lang', registry.String('EN', ("""language to use. See docs for available codes.""")))
conf.registerGlobalValue(Weather, 'apiKey',
registry.String('', ("""Sets the API key for the plugin. You can obtain an API key at http://www.wunderground.com/weather/api/."""), private=True))
conf.registerChannelValue(Weather, 'useImperial',
registry.Boolean(True, ("""Determines whether imperial units (Fahrenheit, etc.) will be used.""")))
conf.registerChannelValue(Weather, 'disableColoredTemp',
registry.Boolean(False, """Determines whether colors will be used for displaying temperatures.""")))
conf.registerGlobalValue(Weather,'forecast',
registry.Boolean(True, ("""Determines whether forecasts will be displayed by default.""")))
conf.registerGlobalValue(Weather,'alerts',
registry.Boolean(False, ("""Determines whether forecasts will be displayed by default.""")))
conf.registerGlobalValue(Weather, 'almanac',
registry.Boolean(False, ("""Determines whether almanac will be displayed by default.""")))
conf.registerGlobalValue(Weather, 'astronomy',
registry.Boolean(False, ("""Determines whether astronomy will be displayed by default.""")))
conf.registerGlobalValue(Weather, 'showPressure',
registry.Boolean(False, ("""Determines whether pressure will be displayed by default.""")))
conf.registerGlobalValue(Weather, 'showWind',
registry.Boolean(False, ("""Determines whether winde will be displayed by default.""")))
conf.registerGlobalValue(Weather, 'showUpdated',
registry.Boolean(False, ("""Determines whether the bot will show the data's "last updated" time by default.""")))
conf.registerChannelValue(Weather,'showImperialAndMetric',
registry.Boolean(True, ("""Determines whether both imperial and metric units will shown where applicable.""")))
conf.registerGlobalValue(Weather, 'lang',
registry.String('EN', ("""Determines the language used by the plugin.""")))
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=250: