Skip to main content.
home | support | download

Back to List Archive

Re: swishdescription

From: <moseley(at)not-real.hank.org>
Date: Thu Jul 31 2003 - 14:36:20 GMT
On Wed, Jul 30, 2003 at 04:22:52PM -0700, Roubart Capcap wrote:
> Hi,
> 
> On some of my PDF files, I have table contents.  Since I use StoreDescription, part of the table of contents are stored as swishdescription shown below:
> Introduction........................................................................................................... 
> i Disclaimer ............................................................................................................. 
> However, the length of it exceeds my HTML tables.  Is there a way to set the wrapping length of the swishdescription?  I am using the Template-Toolkit, so I was thinking of using the "remove" function to remove the "." but I can not seem to make it work.  I would appreciate any help you can give.  Thank you.

Not as easily as it should be.  Where "should be" would be something 
like this with Template-Toolkit:

    [% swishdescription | replace('(.)\1{3,}', $1$1$1 ) %]

The next best solution would be to write a custom filter for 
Template-Toolkit.  perldoc Template::Filters explains how -- it would 
require modifying SWISH/TemplateToolkit.pm, but it's not very hard.  
Template Toolkit is very cool.

I should provide the infrastructure to make it easy to add new filters.  
Maybe later today if I get time.

Now, if you are spidering with -S prog while indexing there's a 
filter_content option where you could just compress those dots (or any 
char as in my example above) while indexing.  That might be a smarter 
way to go if you know you always want to suppress those.

There's nothing inside the swish-e C code that currently can do this.

Speaking of wrap, can you turn it on in your mail program? ;)

-- 
Bill Moseley
moseley@hank.org
Received on Thu Jul 31 14:36:38 2003