dcorking / google-wave-resources

Automatically exported from code.google.com/p/google-wave-resources
0 stars 0 forks source link

Debug option for regex filter matches #830

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It would be of great value if the matches (or at least the first match) which 
allowed a DOCUMENT_CHANGED to pass the defined regexp filter would be displayed 
in the logs when debugging is set to True.

My issue is that I've got a relatively long filter, and from offline testing it 
appears to be a well-formed regexp which only matches what is expected to 
match, but for some reason every DOCUMENT_CHANGED is triggering a match, even 
though the blips' text doesn't contain a match for the regexp. So I'd like to 
know what is making the matching succeed without having to deploy the app 
hundreds of times.

A clarification (not in the logs, but in the documentation) of exactly what is 
being used for matching (is it only the text? the entire JSON? URLs?) would 
probably also be helpful.

filter -> 
:\(|:\)|:\*|\(wink\)|:&|\(handshake\)|\(muscle\)|:#|\(F\)|\(happy\)|:\?|\(devil\
)|\(d\)|\(N\)|\(h\)|B=\)|\\o/|\(envy\)|\(talk\)|B-\)|\(dull\)|\]:\)|\(o\)|:\$|\(
evilgrin\)|\(rock\)|\(mooning\)|\(yawn\)|\(\$\)|\(drink\)|\\:D/|:o|\(rofl\)|\(wo
ndering\)|:d|B=\||\(brokenheart\)|:\||\(bigsmile\)|\(ninja\)|\(sweating\)|:x|:-s
|I=\)|:p|:=@|\|\(|:s|\(worried\)|\(clock\)|:O|:D|\(grin\)|\(no\)|:@|B\)|\(emo\)|
\(cake\)|:X|\(pi\)|\(y\)|\(hug\)|\(london\)|:P|\(mmm\)|B-\||:S|\(sad\)|\(inlove\
)|8\)|X-\(|:-O|:=\||\(H\)|I-\)|:=s|:=p|:-D|:-X|:=o|\(bear\)|:-S|:-P|:=d|\(speech
less\)|\(ss\)|:-o|\(doh\)|\(flex\)|:=S|:=P|\(clapping\)|:-d|\(mo\)|8-\||:-x|:=O|
:-\||\(wasntme\)|:-p|\(L\)|:=D|\(mp\)|\(chuckle\)|\|-\(\)|:=\?|\(fubar\)|\(blush
\)|\(punch\)|:=\*|:=\(|:=\)|8=\)|8\||:=#|;\)|;\(|:=&|:=\$|:-\*|\\:d/|\(tongueout
\)|:-\)|8-\)|\(ok\)|:-#|:-&|\(st\)|:-\$|\(laugh\)|\(~\)|X=\(|:-\?|\(sleepy\)|\(c
rying\)|8=\||\(swear\)|\(nod\)|\(cash\)|\(talking\)|\(banghead\)|\(puke\)|:=x|\(
shake\)|\(movie\)|x=\(|\(music\)|\(wait\)|:=X|:">|\(kate\)|\(sun\)|X\(|\(bandit\
)|x-\(|\(dance\)|>:\)|\(thinking\)|\|=\(|\(smoking\)|\(worry\)|\(:\||:-@|\(think
\)|\(drunk\)|x\(|\(flower\)|\(heart\)|:-\(|;=\)|;=\(|B\||\(smirk\)|\(snooze\)|\(
m\)|\(cool\)|\(film\)|\(hrv\)|\(\*\)|\(time\)|\(smoke\)|\|-\(|\|-\)|\(hi\)|\(bug
\)|\(mail\)|\(whew\)|\(beer\)|:\^\)|\(ph\)|\(makeup\)|\(yes\)|\(toivo\)|\(l\)|\(
rain\)|\(mm\)|\(cry\)|\(D\)|\(ci\)|\(poolparty\)|\(mmmm\)|\(itwasntme\)|\(call\)
|\(headbang\)|\(giggle\)|\(finger\)|\(pizza\)|\(lipssealed\)|\(sweat\)|\(Y\)|\(a
ngry\)|\(nerd\)|\(e\)|;-\)|;-\(|\(kiss\)|\(wonder\)|\(love\)|\(party\)|\(u\)|\(b
ow\)|\(coffee\)|\(clap\)|\(\^\)|\(O\)|\(tmi\)|\(star\)|\(surprised\)|\(skype\)|\
(smile\)|\(middlefinger\)|\(n\)|\(U\)|\(f\)|\(sadsmile\)|\(phone\)|\(angel\)

Original issue reported on code.google.com by soundlin...@gmail.com on 1 Jul 2010 at 7:43

GoogleCodeExporter commented 8 years ago
I forgot, this is the URL of the cap..xml
http://wave-skimmy.appspot.com/_wave/capabilities.xml

Original comment by soundlin...@gmail.com on 1 Jul 2010 at 7:44

GoogleCodeExporter commented 8 years ago
Hmmm, wait, put this into low priority, I believe I found the issue.

It appears that when I replace one of the above matches, ie :) with an image, 
by using r.replace(element.Image(url='...smile.jpg', caption=':)')), upon a new 
character press a new DOCUMENT_CHANGED is issued because of the
{"type":"IMAGE","properties":{"caption":"---->:)<-----","url":"...smile.jpg"}} 
contained in the blip.

I changed the code by removing the "caption='...'" from the replace call, and 
this appears to have fixed the issue.

But now, in relation to the issue 771 ( 
http://code.google.com/p/google-wave-resources/issues/detail?id=771 ), if 771 
gets fixed and I'll start including the emoticon again in the replace method, 
then I'll have the same problem again.

It would then probably be best to ignore any text contained in the image 
properties so that the filters don't match them.

Original comment by soundlin...@gmail.com on 1 Jul 2010 at 8:33