IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Looks straightforward.
Thanks for sharing! Dispatching single-pass parser, it looks like (unless I missed something on a cursory glance). The bit about constructing a huge descending-length regex was interesting. I had forgotten about the WeeCodes, since I never use 'em. ;) That's a good chunk of the handlers.

Reading parts of it makes me sad for being stuck on 1.5.2, however. I can see some significant speedups if one could use just newer libs*. Which of course a full rewrite would address. Plus the logic is already built; that's 90% of the battle.


Saludos,

FuMan


* _Perhaps_ with HTMLParser, but I wouldn't be stuck on that.

New The 2.X code is much cleaner.
I've got older versions for 2.1 and 2.2 around here somewhere.

The code is a Python rewrite (plus additions) of Ben Tilly's perl HTML filter. The code is somewhat messy, since it was just done to prove a point to Ben. :-) Come to think of it, I've got a much nicer ObjectiveC version too.

The nice thing about it is the ability to pass in your own set of handlers.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Dig that funky extensibility groove. :)
I went more of the "plugin" route with Junct, that collab tool I mentioned. By that I basically mean you write a class instead of a function for new behavior. Example signature:

class TableRule(RegexRule):\n    def process(self, topic, content, UI):


Point being I tried to make it easy to write a new module when you wanted new parsing functionality. Still just a callable. But then it was expected with heavyweight parsers (like Calendar, Progress tracking, etc) that the "plugin" module would also include the UI code for new pages.

In addition, I had a need to do multiple passes on the content, and allow some handlers to "lock down" the portions of the content which they altered, so they couldn't then be munged by a later handler. I ended up making a LockableString class with finditer() and sub() methods (a la RE). Plus there were some handlers which a simple regex couldn't handle--Wiki-style formatting stuff.

Hmm... that's been running stably for a month now here at work. I should probably put it up somewhere...
New Why functions and regexes (new thread)
Created as new thread #148403 titled [link|/forums/render/content/show?contentid=148403|Why functions and regexes]
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New And the point was proven...
"good ideas and bad code build communities, the other three combinations do not"
- [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
     Given your comments, perhaps we should rewrite? - (FuManChu) - (30)
         Put up a test environment z.iwethey.org/xforums -NT - (deSitter) - (1)
             You bet. - (FuManChu)
         If that's your guess... - (admin) - (14)
             *That* I would like to see. HTMLTidy, anyone? ;) -NT - (FuManChu) - (13)
                 It's right here: - (admin) - (12)
                     Feature request - (ben_tilly) - (6)
                         Re: Feature request - (admin) - (5)
                             I wondered why I briefly got the Devil's Tower page... - (Another Scott) - (2)
                                 Actually I just randomly take Zope down every so often - (admin) - (1)
                                     Ha! -NT - (Another Scott)
                             Gracias - (ben_tilly) - (1)
                                 Yep. - (admin)
                     Looks straightforward. - (FuManChu) - (4)
                         The 2.X code is much cleaner. - (admin) - (3)
                             Dig that funky extensibility groove. :) - (FuManChu) - (1)
                                 Why functions and regexes (new thread) - (admin)
                             And the point was proven... -NT - (ben_tilly)
         You don't want to try a seaside implementation? - (tuberculosis) - (11)
             Seaside's sessioning is problematic - (admin) - (9)
                 Can you unravel that for the ignorant? -NT - (deSitter) - (6)
                     Seaside doesn't use URLs. - (admin) - (5)
                         Thanks! - (deSitter)
                         That's a fair point - (tuberculosis) - (1)
                             Seaside looks great for actual applications -NT - (admin)
                         Not true - (Avi Bryant) - (1)
                             Ah, good. I'll have to look at Seaside again. (new thread) - (admin)
                 can that be bypassed? - (boxley) - (1)
                     Not exactly - (tuberculosis)
             This is a great idea - (deSitter)
         Go for it. - (ubernostrum)

Minimal oversight is seen as more expensive and odious than frequent disaster.
87 ms