[Framework-Team] Re: [Plone-developers] wicked stuff

2007-07-25 Thread Alexander Limi
On Wed, 25 Jul 2007 13:52:49 -0700, whit  
[EMAIL PROTECTED] wrote:


got a dual pattern filtering working locally  yesterday. will release  
for rc2.


Go Whit!

--
Alexander Limi · http://limi.net


___
Framework-Team mailing list
Framework-Team@lists.plone.org
http://lists.plone.org/mailman/listinfo/framework-team


[Framework-Team] Re: [Plone-developers] wicked stuff

2007-07-25 Thread whit
got a dual pattern filtering working locally  yesterday. will release 
for rc2.


-w


--

-- d. whit morriss --
- senior engineer, opencore -
- http://www.openplans.org  -
- m: 415-710-8975   -

If you don't know where you are,
 you don't know anything at all 



Dr. Edgar Spencer, Ph.D., 1995


___
Framework-Team mailing list
Framework-Team@lists.plone.org
http://lists.plone.org/mailman/listinfo/framework-team


[Framework-Team] Re: [Plone-developers] wicked stuff

2007-07-18 Thread whit

Martijn Pieters wrote:

On 7/17/07, whit [EMAIL PROTECTED] wrote:

Martijn Pieters wrote:
def chunks(self):
 chunks = super(WickedFilter, self).chunks
 # every 2nd entry is the parens group, so filter out by
 # grabbing every 1st and 3rd
 firsts = itertools.islice(chunks, 0, None, 3)
 thirds = itertools.islice(chunks, 2, None, 3)
 result = []
 # then append every 1st and 3rd to a list
 map(result.extend, itertools.izip(firsts, thirds))

any difference between this and:

for slice in itertools.izip(firsts, thirds):
 result.extend(slice)



Nothing, the code grew a bit and wasn't finished. :) There is a if
len(chunks) = 1: return chunks missing there too, for example.


there may be a simpler juncture for getting the desired effect.

the filter is run by a subscriber, and running it twice (once for each
desired pattern) would be trivial, rather than pushing additional
complexity into the filtering classes.  This would happen for both the
findall call that is part of the storing event and the split call that
is part of rendering.

Plone would use these special subscribers and if folks just wanted
either/or behavior, they could disable them and use the old subscribers.


I am not too familiar with the subscribers, but that sounds like a
fine plan to me.
subscribers handle all the action on render or on store.  iirc, it's 
just a matter of setting the pattern before each run of the filter and 
clearing the memos. 



I am assuming the current UI uses a radio select (format a *or* format
b). You could change this to a set of checkboxes. Replacing the
subscriber with one that runs either filter based on those selection
boxes would get you the same effect, no?

iirc, the whole point of this was so limi could have an interface where 
one could turn on or off wiki linking(no other choices).  I assume after 
this is solved, thats' what will happen.


-w

--

-- d. whit morriss --
- senior engineer, opencore -
- http://www.openplans.org  -
- m: 415-710-8975   -

If you don't know where you are,   
you don't know anything at all 


Dr. Edgar Spencer, Ph.D., 1995

begin:vcard
fn:D. Whitfield  Morriss
n:Morriss;D. Whitfield 
org:The Open Planning Project;OpenPlans
adr:;;1309 Ashwood Ave;Nashville;TN;37212;USA
email;internet:[EMAIL PROTECTED]
title:Lead Developer 
tel;home:615 292-9142
tel;cell:415 710-8975
x-mozilla-html:FALSE
version:2.1
end:vcard

___
Framework-Team mailing list
Framework-Team@lists.plone.org
http://lists.plone.org/mailman/listinfo/framework-team


[Framework-Team] Re: [Plone-developers] wicked stuff

2007-07-18 Thread Alexander Limi
On Wed, 18 Jul 2007 08:33:04 -0700, whit  
[EMAIL PROTECTED] wrote:



Martijn Pieters wrote:

I am assuming the current UI uses a radio select (format a *or* format
b). You could change this to a set of checkboxes. Replacing the
subscriber with one that runs either filter based on those selection
boxes would get you the same effect, no?


iirc, the whole point of this was so limi could have an interface where
one could turn on or off wiki linking(no other choices).  I assume after
this is solved, thats' what will happen.


Yeah, it has spiralled a bit out of control discussion-wise, although I do  
appreciate your efforts very much. :)


Essentially, I just want to be able to have an on/off switch on types that  
enables wiki markup, and that works with both the MediaWiki-style [[link]]  
notation as well as the more internationally friendly ((link)) syntax.


If the implementation supports limiting to just one of them, that's fine —  
but I don't think that's necessary in basic Plone. I'm actually fine with  
the current way it works too, I had no idea it would be this complex to  
support both syntaxes in the same paragraph. That case is unlikely to come  
up in anything but synthetic testing anyway. :)


--
Alexander Limi · http://limi.net


___
Framework-Team mailing list
Framework-Team@lists.plone.org
http://lists.plone.org/mailman/listinfo/framework-team