Antonio Dolcetta on Wed, 24 Jan 2007 11:33:46 -0700 (MST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[s-d] proposal parser, progress


hi
I've got a working bot that parses email containing proposals

to test send mail to antonio@xxxxxxxxx with a subject of [proposals]

how it works:
anything between {{ and }} is counted as a proposal UNLESS it's in comment space so:
{{ this would be a proposal}}
/* {{ this is not}} */

supports:
multiple proposals in a single message
nested comments
wierd formatting

bugs:
unbalanced quotes (both comment and proposal) make it throw an error
[[ and /* style comments are completely interchangeable, so
[[ this is a comment */ this is not ]] <- and this probably makes it barf

it sends you back a formatted version of the proposals you just sent him.
it suggests a proposal number
it accepts titles and stuff
it produces an id that can be used to specify that proposal in future transactions.

all this stuff should be specified at the beginning of the proposal, befor the first blank line, this is a weak point that I don't like a lot.


i forward an example message

sorry for the horrible english and the mad rambling, but i'm in a hurry

ciao




--- Begin Message ---
Hello, this is the proposal bot
In your message <45B7A420.90909@xxxxxxxxx> sent on Wed, 24 Jan 2007 19:23:28 +0100 you included some proposals
here's what I think you wanted me to do:

--- found proposal 1:
[[proposed proposal number: 21 ]]
[[proposal id: um0Sb73iSc use this id in future requests about this prop.]]
Title: silly test proposal

in rule x-y replace: {{abcdefg hijklmn}}
with:
{{
1
2
3
[[ a comment  ]]
4
5
6
7890}}
[[i a tricky comment {{]]
/* nested and very tricky comment
   [[ bla }}}}}}}}}}}}}}}
  {{ ]] bla bla
				bla ? */ proposal text
--- end proposal 1
--- found proposal 2:
Title: second test
proposal id: antonio111
[[proposal number: 17]]

bla bla bla


last sentence
--- end proposal 2

Don't worry, nothing has actually be done, because I'm still being tested.
Please send your impressions to antonio <antonio.dolcetta@xxxxxxxxx>

for your reference here's what you sent me:

----- Original Message ----
start test
{{
Title: silly test proposal

in rule x-y replace: {{abcdefg hijklmn}}
with:
{{
1
2
3
[[ a comment  ]]
4
5
6
7890}}
[[i a tricky comment {{]]
/* nested and very tricky comment
   [[ bla }}}}}}}}}}}}}}}
  {{ ]] bla bla
				bla ? */ proposal text
}}


this is another proposal: {{Title: second test
proposal id: antonio111
[[proposal number: 17]]

bla bla bla


last sentence}}
end proposal
end test







--- End Message ---
_______________________________________________
spoon-discuss mailing list
spoon-discuss@xxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/spoon-discuss