Skip to main content.
home | support | download

Back to List Archive

Re: ReplaceRules, excerpt, and PDFs

From: Josh Santangelo <joshs(at)not-real.smashingideas.com>
Date: Tue Jun 17 2003 - 22:51:19 GMT
David L Norris wrote:
> On Tue, 2003-06-17 at 13:51, Josh Santangelo wrote:
> 
>>ReplaceRules replace "/home/html/opentv/" "/"
>>/home/httpd/html/opentv/company/index.html
>>
>>What I want is:
>>/company/index.html
>>
>>What am I missing?
> 
> 
> httpd?
> 
> You could also do this:
>   ReplaceRules remove /home/httpd/html/opentv

Hah! Of course.

>>Also, is it difficult to get the search results to output an excerpt of 
>>matched documents along with the results? What goes in the config file 
>>and templates for that?
> 
> 
> StoreDescription:
>  http://swish-e.org/current/docs/SWISH-CONFIG.html#item_StoreDescription
> 
> I believe swish.cgi picks up the description automatically.

I added this: StoreDescription HTML <body> 20000

I'm using TemplateDefault.pm because I'm too lazy to figure out the 
others. in show_result{}, $description was previously returning 
"(NULL)". Now it seems to be empty.

>>How do I index PDFs? I have filter-bin/_pdf2html.pl, but I'm not sure 
>>how to use it. The docs on the FileFilter directive are confusing me.
> 
> 
> If you're using the FileFilter directive then you only need pdftotext
> which is provided by xpdf.
> 
> The Documentation:
>   http://swish-e.org/current/docs/SWISH-CONFIG.html#item_FileFilter
> 
> Gives this example for Unix:
>   FileFilter .pdf       pdftotext   "'%p' -"

Excellent. I'm getting a lot of these:
Error: PDF version 1.4 -- xpdf supports version 1.3 (continuing anyway)

But it seems to be working anyway, more or less.

Thanks for the help! Would be interested in getting the description 
thing working, though.

One other thing: I'm dev'ing this on RH, but it's going to end up on a 
Solaris box. Can I just ship the binaries for Swish-e and XPDF over to 
the live machine, and just change the file paths around, or am I going 
to have to do the whole config dance again?

-josh
Received on Tue Jun 17 22:55:52 2003