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 from supybot.questions import expect, anything, something, yn
conf.registerPlugin('Weather', True) conf.registerPlugin('Weather', True)
Weather = conf.registerPlugin('Weather') Weather = conf.registerPlugin('Weather')
conf.registerGlobalValue(Weather,'apiKey', registry.String('', ("""Your wunderground.com API key."""), private=True)) conf.registerGlobalValue(Weather, 'apiKey',
conf.registerChannelValue(Weather,'useImperial', registry.Boolean(True, ("""Use imperial units? Defaults to yes."""))) 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,'disableColoredTemp', registry.Boolean(False, """If True, this will disable coloring temperatures based on values.""")) conf.registerChannelValue(Weather, 'useImperial',
# conf.registerChannelValue(Weather,'useWeatherSymbols', registry.Boolean(False, """Use unicode symbols with weather conditions and for wind direction.""")) registry.Boolean(True, ("""Determines whether imperial units (Fahrenheit, etc.) will be used.""")))
conf.registerGlobalValue(Weather,'forecast', registry.Boolean(True, ("""Display forecast in output by default?"""))) conf.registerChannelValue(Weather, 'disableColoredTemp',
conf.registerGlobalValue(Weather,'alerts', registry.Boolean(False, ("""Display alerts by default?"""))) registry.Boolean(False, """Determines whether colors will be used for displaying temperatures.""")))
conf.registerGlobalValue(Weather,'almanac', registry.Boolean(False, ("""Display almanac by default?"""))) conf.registerGlobalValue(Weather,'forecast',
conf.registerGlobalValue(Weather,'astronomy', registry.Boolean(False, ("""Display astronomy by default?"""))) registry.Boolean(True, ("""Determines whether forecasts will be displayed by default.""")))
conf.registerGlobalValue(Weather,'showPressure', registry.Boolean(False, ("""Show pressure in output?"""))) conf.registerGlobalValue(Weather,'alerts',
conf.registerGlobalValue(Weather,'showWind', registry.Boolean(False, ("""Show wind in output?"""))) registry.Boolean(False, ("""Determines whether forecasts will be displayed by default.""")))
conf.registerGlobalValue(Weather,'showUpdated', registry.Boolean(False, ("""Show updated in output?"""))) conf.registerGlobalValue(Weather, 'almanac',
conf.registerChannelValue(Weather,'showImperialAndMetric', registry.Boolean(True, ("""In channel, display output with Imperial and Metric?"""))) registry.Boolean(False, ("""Determines whether almanac will be displayed by default.""")))
conf.registerGlobalValue(Weather,'lang', registry.String('EN', ("""language to use. See docs for available codes."""))) 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: # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=250: