Update to show config variables for each plugin

This commit is contained in:
James Vega 2004-08-18 14:10:38 +00:00
parent fd706575be
commit 3ea150cbd3

View File

@ -237,18 +237,19 @@ def makePluginDocumentation(pluginWindow):
try: try:
pluginconf = conf.supybot.plugins.get(pluginName) pluginconf = conf.supybot.plugins.get(pluginName)
fd.write(textwrap.dedent('''</table><br /><table><tr id="trheader"> fd.write(textwrap.dedent('''</table><br /><table><tr id="trheader">
<td>Config Var</td><td>Help</td>''')) <td>Config Var</td><td>Default Value</td><td>Help</td>'''))
trClass = trClasses[trClass] trClass = trClasses[trClass]
for config in [(c[0], c[1].help) for c in\ for config in [(c[0], c[1], c[1].help) for c in\
pluginconf.getValues(getChildren=True,fullNames=False)]: pluginconf.getValues(getChildren=True,fullNames=False)]:
name = config[0] name = config[0]
help = config[1] default = str(config[1])
help = config[2]
help = cgi.escape(help) help = cgi.escape(help)
trClass = trClasses[trClass] trClass = trClasses[trClass]
fd.write(textwrap.dedent(''' fd.write(textwrap.dedent('''
<tr class="%s" id="%s"><td>%s</td> <tr class="%s" id="%s"><td>%s</td><td style="width:>%r</td>
<td class="detail">%s</td></tr> <td class="detail">%s</td></tr>
''' % (trClass, name, name, help))) ''' % (trClass, name, name, default, help)))
except registry.NonExistentRegistryEntry: except registry.NonExistentRegistryEntry:
pass pass
fd.write('</table>\n') fd.write('</table>\n')