mhonarc-users

Re: Suppressing Part of a Message

2000-05-04 13:37:25
My mistake?

I have attempted to make and "register" a revised filter, but I got
the following error:

Reading /home/wade/nsmail/temp .
Can't locate /home/wade/MHonArc2.3.3/bin/mhtxtplain2.pl in @INC at
/usr/local/lib/perl5/site_perl/readmail.pl line 769, <FOPEN2> chunk
48.

Am I supposed to put the filter somewhere special?

Wade

FYI
I have the following in my rcfile (I added the explict path when it
failed the first time):

<MIMEFilters>
text/html;                 m2h_text_html::filter;      
/home/wade/MHonArc2.3.3/bin/mhtxthtml2.pl
text/plain;                m2h_text_plain::filter;     
/home/wade/MHonArc2.3.3/bin/mhtxtplain2.pl
</MIMEFilters>

I have the following (with addititons) in the revised filters:

in mhtxthtml2.pl
    ## Strip out certain elements/tags
    $data =~ s/<!-- begin ONElist Sponsor.*?end ONElist Sponsor
-->//g;
    $data =~ s/<!-- |@|begin eGroups banner.*?end end eGroups
banner|@| -->//g;
    $data =~ s/<!-- begin banner.*?end banner -->//g;
    $data =~
s/<!--\sbegin[\S\s]*?-->[\S\s]*?<!--\send[\S\s]*?-->//g;    
    $data =~ s|<!doctype\s[^>]*>||i;
    $data =~ s|</?html[^>]*>||ig;
    $data =~ s|</?body[^>]*>||ig;
    $data =~ s|<head\s*>[\s\S]*</head\s*>||i;

in mhtxtplain2.pl
    ## Convert URLs to hyperlinks
    $data =~ s@($HUrlExp)@<A $target HREF="$1">$1</A>@gio
        unless $nourl;
    $data =~ s/<!-- begin ONElist Sponsor.*?end ONElist Sponsor
-->//g;
    $data =~ s/<!-- |@|begin eGroups banner.*?end end eGroups
banner|@| -->//g;
    $data =~ s/<!-- begin banner.*?end banner -->//g;
    $data =~
s/------------------------------------------------------------------------.*?------------------------------------------------------------------------//g;
    $data =~
s/<!--\sbegin[\S\s]*?-->[\S\s]*?<!--\send[\S\s]*?-->//g;    
    ($data);

-- 
Wade Van Buskirk - http://www.psmfc.org/~wade

Gunnar Hjalmarsson wrote:
I guess, based on your description, that the original messages are plain
text ditto. If so, please check the following message for a tip:
http://www.xray.mpe.mpg.de/mailing-lists/mhonarc/2000-03/msg00009.html
-- 
Wade Van Buskirk - http://www.psmfc.org/~wade

<Prev in Thread] Current Thread [Next in Thread>