[Zope-CMF] Pythonish Questions

Jon Edwards jon@pcgs.freeserve.co.uk
Tue, 1 May 2001 13:59:38 +0100


Thanks for the swift response! Comments below...

-----Original Message-----
From: tres [mailto:tres]On Behalf Of Tres Seaver
Sent: 01 May 2001 12:51
To: Jon Edwards
Cc: Zope-Cmf
Subject: Re: [Zope-CMF] Pythonish Questions


Chris Withers has recently posted a method he uses for stripping
HTML in Squishdot;  I would search the list archives for it.

Jon >> Thanks, I'll take a look. So there's no Zope/Python function that
would do this? ...kinda the reverse of the one that parses StructuredText to
HTML? <<Jon

One way to accomplish this would be to derive a new class/ZClass
from CMFDefault.Document, and override just the SearchableText method.

Jon >> ahhh of course (sound of lightbulb switching on!) ...I guess you
could also do it with a Filesystem based content type? I'm working my way
through the Filesystem tutorial -
http://cmf.zope.org/Members/lucas/FSBasedContent/howToMakeNewContentType -
but it's a bit out of date, is there any more recent documentation on this?
<< Jon

> This would keep the Catalog tidier (no HTML bits to confuse
> search results),

That is a reasonable goal.

Jon >> Is this something that DC would be adding in the near future? Don't
want to be pushy, it's just that I'd rather leave it to the experts whenever
possible! ;-) <<Jon

Putting SearchableText in the '<meta>' tags doesn't make much
sense to me -- the headers are supposed to be for "meaningful
categorization", since the search engine can already index the
body of the page.  Imagine doubling a 100k page by replicating
its contents in the headers?

Jon >> Good point! :-) I was thinking of stripping out all the 'and', 'or',
'the'... words and then picking uniquevalues, to give a quick-n-dirty
keywords list. It's ages since I checked SearchEngine Watch, but I seem to
remember a lot of search-engines gave more weight to the headers than the
body text? Time to swot up and see if this is still the case! <<Jon

The comment is a fossil, I think, from a time when the underlying attribute
was not being populated.  The methods are
fine to use, and your proposal is a natural extension to it.

Jon >> Thanks, is this something that you are already considering for use
with CompositeContent Objects? <<Jon

Composites are one of the major features we plan to add for
the next release of the CMF.  This list is the main discussion
point for them, so far;  currently, DC plans to generalize from
the composites we have built for several consulting gigs.

Jon >> Excellent! :-)  ...any rough idea as to release date? I know it's
probably a lot to ask, but could you post DC's "Current Thinking" on this
issue, as that would make it easier to make comments and suggestions? (and
decide whether we will have to do our own hacking, to suit our individual
apps, or can safely "leave it to the experts" :-) ...or just add a bit more
detail to http://cmf.zope.org/rqmts/proposals/composite_content/view
perhaps?

Thanks again for an excellent toolkit!

Cheers, Jon