Bill Moseley wrote:

At 01:08 PM 01/27/02 +0800, Stas Bekman wrote:

Do a normal indexed search for most, but offer an option to search for perl
code and then use fgrep.

OK, so how hard would be to have a simple prototype to play with?


Which part?

Indexing the site with swish is easy and can be setup in a few minutes.   I
just did it in my modperl-docs copy.


cool!


Once we have a script running we can worry about searching perl code.
fgrep might be a quick hack.  I wouldn't worry about speed or machine load
at this time.  For now, let's wait until we have a problem before we solve it.


ok


The hard part, at least for me, is integrating with DocSet.

One problem, from what I can tell, will be that the template variables that
DocSet creates from parsing the source files are not available for CGI
scripts run outside of DocSet.  So a CGI script will not be able to use the
same templates.


I don't understand why do you need the template variables. Why swish cannot work with the static content?


Also (minor point), with out looking too hard, I noticed that DocSet didn't
copy dot files (.htaccess .swishcgi.conf),


Did you specify these files in the copy_glob attribute?

and also didn't keep permissions
(so CGI scripts lost their execute bit).  At least that's what it looked
like.  Hum, I'm sure there's a way to do that, but out of time now.


That should be easily fixable. I use File::Copy::copy to copy the files, so I think I need to move it to File::Copy::syscopy. Can you try if it does the trick? see DocSet/Util.pm


Some minor details:

I assume spidering is the way to go (instead of scanning the "src" directory).
It makes most sense to index what people can actually get to by following
links.

Also, the templates should have processing directives for swish.  This is
what I do:

  ...
  <body>
  <!-- SwishCommand noindex -->
  ...
  <!-- SwishCommand index -->
      [% content %]
  <!-- SwishCommand noindex -->
  ...

Then swish is indexing the <head> section, and then only indexing content
(and not menu text and so on).


that's very easy, just put these into tmpl/custom/html/page_body
next to the #render the content comment.


Stas, if you know how to deal with integrating a CGI into the templates
with DocSet, cool.   But, I don't see how, unless DocSet is writing a file
that can be used by TT (PRE_PROCESS) to give the CGI script the same
template variables available when DocSet is running.


I still don't understand what are you trying to do here.

Though, all the linkage, titles, abstract info is cached already and used by the CacheNavigate to build all the index.html files, menus and pre|next navigations. Without it you will have to rebuild the whole site when you change one file.


[snipped the ideas, which we will return to once I understand what are they trying to solve :)]



--


_____________________________________________________________________ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to