[Spambayes] proposed changes to hammie & co.
Tim Stone - Four Stones Expressions
tim@fourstonesExpressions.com
Sun Dec 1 04:09:19 2002
Dredging up a less recent thread...
11/21/2002 11:07:36 AM, Neale Pickett <neale@woozle.org> wrote:
>> Options class is a bit too much right now... Lots of wonderful options
>> for research, but nobody in their right mind would tweak most of them.
>> I think we should split options into ones that the average person
>> would be interested in, and those that the average person should never
>> touch. Then give 'em a (Richie style web) ui to tweak the ones that
>> they should be interested it. I'd be happy to run with that one for a
>> while...
>
>Now there's an idea, make a configuration engine that runs as a
>SimpleHTTPServer, and have the person connect with their favorite
>browser to some port on localhost. Isn't that how SATAN worked? In any
>case, that would be a good very project for someone who wanted to help
>out but didn't know where to start :)
I've taken a good swipe at creating a configuration application that the
average user could use to make simple changes to the spambayes configuration.
In particular, it's useful for pop3 users to configure their settings. But
it's also useful for other settings as well, and perhaps even for some
administrative tasks, like purging old words from databases, doing a zodb
pack, maybe printing word probabilities, and stuff like that.
It's html based, and it uses a subclass of SimpleHTTPServer, named
SmarterHTTPServer. (Sorry, Richie, I just couldn't figure out how to make the
stuff in pop3proxy work for me...) SimpleHTTPServer cannot serve requests with
parameters very well, so SmarterHTTPServer adds that functionality. It also
adds the ability to call 'methlets' or methods on the server class which can
be used to dynamically create content. These two additional functions are
quite handy, and may even warrant inclusion into SimpleHTTPServer.
The program maintains options changes in bayescustomize.ini. <rant>Lemme tell
ya what... the way Options.py is set up made figuring out how to do this stuff
one freakin pain. What's up with that? Why does OptionsClass wrap a
ConfigParser, rather than subclass it?</rant> Using bayescustomize.ini is
very nice, because it allows the user to easily revert back to default values
if that ever becomes necessary.
To execute this module, just invoke OptionConfig.py <optional port number>.
The working directory should be the same one where the bayescustomize.ini file
is located. The port number is the port the http server will listen on, and
defaults to 8000. Then point your browser at http://locahost:8000 (or
whatever port you chose).
I've embedded all the necessary html in the module itself, but this can really
only be temporary. We will inevitably accumulate html for little applications
like this (e.g. pop3proxy), and more importantly, for documentation. I think
that the documentation standard for the project should be html. The look and
feel that Richie came up with for the pop3proxy works very well for me. We
need to decide how we're going to structure the directories for that kind of
stuff. May I propose the following:
html
application
pop3proxy
optionConfig
doc
graphics
- TimS
>
>Neale
>
>
>
c'est moi - TimS
www.fourstonesExpressions.com
More information about the Spambayes
mailing list