[Zope-dev] searching/viewing Zope source?

Jon Udell udell@monad.net
Sat, 08 Jan 2000 21:08:02 -0500


This is a cryptographically signed message in MIME format.

--------------msA259D65E7B101CCB2F37A035
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

On the "eat your own dogfood" principle, I decided today that since --
let's face it -- the Zope Python, DTML, and C source files *are* the
definitive documentation -- I ought to index them, and why not with
ZCatalog?

First, I imported /zope/lib/python into Zope. Which took longer than I
expected, mainly because although I remembered having used fsimport.py
in Zope 1.x, I could not find it in 2.x, nor in any searchable Zope
place I could think of (zope.org, egroups.com, altavista, deja.com,
etc.).

Fortunately, I found a backup of Zope 1 that had fsimport.py, so I set
it up as an external method, made a Zopedir called src, and ran this:

http://host/src/fsimport?fsdir=/usr/zope2/lib/python

Cool. Now the source tree is in Zope. I added a ZCatalog to the src
folder, and told it to add everything. I'd have liked to have added just
*.py, *.dtml, and *.c, but none of the strings I could think of typing
into the 

with ids:
containing:
expr:

boxes of the "Find Items to ZCatalog"

seemed to find anything. I'm guessing that regexps can be used here
somewhere, but none of the usual suspects (zope.org, egroups.com,
altavista, deja.com, etc.) yielded any clues. (This, of course, is *why*
I was trying to index the source in the first place!)

Whatever, I just took the whole lot, 800 and some files. Then tried
searching, and realized -- oops, no text index, only a meta_data index.
After searching the usual suspects again (zope.org, egroups.....) I came
up with the idea of indexing the 'data' attribute of the File objects.

But no joy. It's looking like either:

a) wrap those files, in some way, so that they have a catalog-able
attribute (which I guess means changing fsimport.py?)

or

b) use a conventional search engine

I guess b) sounds easier :-)

The reason for all this is that I've begun, finally, to be productive in
Zope. I would like to be much more productive. I think one thing that
would
help me would be something like Mozilla's searchable, cross-referenced
source
viewer:

<http://lxr.mozilla.org/seamonkey/>

I wonder if there's a tool like this that groks Python syntax rather
than C? 


-- 
Jon Udell | <http://udell.roninhouse.com/> | 603-355-8980
--------------msA259D65E7B101CCB2F37A035
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
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