[Dev] Rule System was: Re: Rules Discovery

Chris Allum chris.allum at ihug.co.nz
Fri Nov 1 14:23:30 PST 2002

[cross posting to dev list]

This sounds like a good approach.

There should be a API that rule scripts can use to get specific 
information about a message (particular header, or body), and set 
information as appropriate, such as indicating which category it should 
belong in.

For example (in no particular language):

script filter_message ( message_id ) {
	get "from" header for message_id // a Chandler API
	get body for message_id
	// do some processing
	if ( ... ) {
		add category "Personal" to message_id // some more
		do not apply more rules to message_id // example API's

Of course this could be provided through the 'wizard' interface.

These scripts could have access to a statistical filtering package 
(clippy) as either part of the Chandler API or some external package.


On Saturday, November 2, 2002, at 08:50  AM, Charlie Joynt wrote:

> I agree. I've just posted a mail that was far too long on message 
> filtering
> in response to Peter's original so I thought I'd separate my replies!
> The basic/average user will/should be able to use the simple method of
> constructing logical sentences from phrases that are turned into rules.
> "When a message arrives... From: Ex-wife... Delete it". Simple, neat, 
> etc.
> The power user could create rules based on some scripting language 
> that uses
> regexs, etc. that Chandler calls and receives some sensible response 
> from.
> These rules could be saved individually (e.g. as python scripts) in a 
> rules
> folder.
> Any rule that Chandler made through the 'wizard' would also be saved 
> as such
> a file. Thus, you could use the wizard to create a ball-park rule and 
> then
> tweak it by hand if necessary. It would also be simple to import these
> rules, download updates, etc.
> The 'clippy' part sounds complicated to me--if you said that you were
> discarding a message because you suspected it would be pornographic, 
> how
> would Chandler know what made you suspicious?
> Maybe it should (a) ask "should the message have matched any existing 
> rule?"
> and then (b) prompt you to highlight text, select a From: address or a
> couple of other basic things that it can then use to improve an 
> existing
> rule or create a new one.
> Charlie
> -----Original Message-----
> From: joel finkle [mailto:joelfinkle at hotmail.com]
> Sent: 01 November 2002 19:05
> To: design at osafoundation.org
> Subject: [Design] Rules Discovery
> Peter Herndon made some valid points about rules, and I agree that the
> typical GUI rule builder is too stoopid (sic), but just giving the 
> novice a
> Python screen to write their own is probably expecting too much.
> Some kind of rules "discovery" process would be sweet.  I expect that 
> I can
> add any number of tags to an item, and tell each view which things to 
> show
> -- that's easy.  But for things trickling into the Inbox, I need to 
> give 
> Chandler a chance to do some of this for me -- teach it what to do with
> mail.
> Unfortunately, I'm picturing Clippy here:
> "You threw that away without reading it.  Can you tell me why?"
> [] Porn
> [] Unsolicited Advertisement
> [] Extra copy of message
> [] Ex-wife
> One other random thought: I know the origin of the name of the 
> project, but
> I still think it might be worth having the default "You have mail" 
> sound be
> "Bing!"

More information about the Dev mailing list