[spambayes-dev] Auto-generation of options documentation

Neale Pickett neale at woozle.org
Tue Oct 28 14:44:06 EST 2003


I whipped a little something together to generate a document about the
possible options for the .ini file.  Here's the output:

  http://woozle.org/~neale/f.html

Here's the source:

    import cgi
    from spambayes import Options

    for k,v in Options.defaults.iteritems():
        print '<h1>[%s]</h1>' % k
        print '<dl>'
        for item in v:
            print '<dt>%s</dt>' % item[0]
            print '<dd>'
            print '<p><b>%s</b></p>' % item[1]
            print '<p>%s</p>' % item[3]
            print '<p>Default: %s</p>' % cgi.escape(str(item[2]))
            print '</dd>'
        print '</dl>'
        print '<hr>'

Would a souped-up version of this be a useful addition to the website?
I mean, we've already gone to the trouble to document the entire options
file...

Neale
(Not the best at web page design)



More information about the spambayes-dev mailing list