David,
I ran these on bbcbusiness.pm:
NewsClipper -e 'bbcbusiness,limit number=10,dumpdata'
NewsClipper -e 'bbcbusiness,limit number=10,grep words="gif"
invert,dumpdata'
NewsClipper -e 'bbcbusiness,limit number=10,grep words="gif" invert, \
grep words="jpg" invert,dumpdata'
The results are attatched in dumpadata1, dumpdata2, and dumpdata3
respectively.
After running these I added :
@$data = grep { $$_ !~ /(gif|jpg)/i } @$data;
To bbcbusiness.pm, and that did remove lines containing "gif" and "jpg". But
I would still like to figure out why the grep invert filter does not work,
because it is a handy filter to have.
Thanks In advance,
Vikas
>From: David Coppit <[EMAIL PROTECTED]>
>To: Vikas Gupta <[EMAIL PROTECTED]>
>CC: News Clipper Mailing List <[EMAIL PROTECTED]>
>Subject: Re: Problem with Filter: Grep
>Date: Fri, 23 Jun 2000 10:24:59 -0400 (EDT)
>
>On Thu, 22 Jun 2000, Vikas Gupta wrote:
>
> > I believe that I have sucessfully Installed NewsClipper Version 1.20-os.
>But
> > it seems as if the grep filter is not working. I am basically trying to
> > filter out images. Limit is working, grep(inverted) is not. Below is the
> > newsclipper segment of my page, as well as a list of perl module
>versions
> > installed:
> >
> > <!--newsclipper
> > <input name=test>
> > <filter name=limit number=10>
> > <filter name=grep words="gif" invert>
> > <filter name=grep words="jpg" invert>
> > <output name=array>
> > -->
>
>Can you send the output of these:
>NewsClipper -e 'test,limit number=10,dumpdata'
>NewsClipper -e 'test,limit number=10,grep words="gif" invert,dumpdata'
>NewsClipper -e 'test,limit number=10,grep words="gif" invert, \
> grep words="jpg" invert,dumpdata'
>
>Also, if your test handler should never return an image, then I recommend
>stripping out images from inside the test handler, using something like:
>
> @$data = grep { $$_ !~ /(gif|jpg)/i } @$data;
>
>Lastly, you should do your limit after the greps, since the greps may
>remove
>everything from the 10 remaining items...
>
>Thanks,
>David
>
>____________________________________________________________________________
>David Coppit <[EMAIL PROTECTED]> President, Spinnaker
>Software
>http://www.newsclipper.com/ -- Snip and ship dynamic content to your
>website
>
>
>
>-
>If you would like to unsubscribe from this mailing list send an email to
>[EMAIL PROTECTED] with the body "unsubscribe newsclipperlist
>YOUR_EMAIL_ADDRESS" (without the quotes) or use the form provided at
>http://www.NewsClipper.com/TechSup.htm#MailingList.
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
<p>
Type signature is: @($Link) ("array of 'Link scalar'")
</p>
<p>
ARRAY:
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_802000/802527.stm"> <IMG
ALIGN="left" ALT="Airbus computer-generated image of the planned super jumbo" BORDER=0
HSPACE=5 SRC="http://news.bbc.co.uk/olmedia/800000/images/_802592_a3xx100.jpg"
WIDTH=100> Take off for super jumbo<BR> </A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_675000/675654.stm">The super
jumbo fact file</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_802000/802617.stm">Jobs boost
from super jumbo deal</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_125000/125726.stm">Rivals in
the air</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_803000/803304.stm"> <IMG
ALIGN="left" ALT="Amazon headquarter" BORDER=0 HSPACE=5
SRC="http://news.bbc.co.uk/olmedia/800000/images/_803304_amazonsign100.jpg" WIDTH=100>
Amazon tumbles to year-low<BR> </A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_642000/642650.stm">Amazon's
fight for dominance</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_754000/754081.stm">Will
investors still turn to the web?</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/world/americas/newsid_803000/803806.stm"> <IMG
ALIGN="left" ALT="Warner Bros logo" BORDER=0 HSPACE=5
SRC="http://news.bbc.co.uk/olmedia/800000/images/_803806_wb100.jpg" WIDTH=100> Music
giants sue 'pirates'<BR> </A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_743000/743851.stm">EMI enters
digital music arena</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/entertainment/newsid_737000/737578.stm">The
music industry's MP3 headache</A>
</p>
<p>
Type signature is: @($Link) ("array of 'Link scalar'")
</p>
<p>
ARRAY:
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_802000/802527.stm"> <IMG
ALIGN="left" ALT="Airbus computer-generated image of the planned super jumbo" BORDER=0
HSPACE=5 SRC="http://news.bbc.co.uk/olmedia/800000/images/_802592_a3xx100.jpg"
WIDTH=100> Take off for super jumbo<BR> </A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_675000/675654.stm">The super
jumbo fact file</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_802000/802617.stm">Jobs boost
from super jumbo deal</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_125000/125726.stm">Rivals in
the air</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_803000/803304.stm"> <IMG
ALIGN="left" ALT="Amazon headquarter" BORDER=0 HSPACE=5
SRC="http://news.bbc.co.uk/olmedia/800000/images/_803304_amazonsign100.jpg" WIDTH=100>
Amazon tumbles to year-low<BR> </A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_642000/642650.stm">Amazon's
fight for dominance</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_754000/754081.stm">Will
investors still turn to the web?</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/world/americas/newsid_803000/803806.stm"> <IMG
ALIGN="left" ALT="Warner Bros logo" BORDER=0 HSPACE=5
SRC="http://news.bbc.co.uk/olmedia/800000/images/_803806_wb100.jpg" WIDTH=100> Music
giants sue 'pirates'<BR> </A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_743000/743851.stm">EMI enters
digital music arena</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/entertainment/newsid_737000/737578.stm">The
music industry's MP3 headache</A>
</p>
<p>
Type signature is: @($Link) ("array of 'Link scalar'")
</p>
<p>
ARRAY:
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_802000/802527.stm"> <IMG
ALIGN="left" ALT="Airbus computer-generated image of the planned super jumbo" BORDER=0
HSPACE=5 SRC="http://news.bbc.co.uk/olmedia/800000/images/_802592_a3xx100.jpg"
WIDTH=100> Take off for super jumbo<BR> </A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_675000/675654.stm">The super
jumbo fact file</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_802000/802617.stm">Jobs boost
from super jumbo deal</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_125000/125726.stm">Rivals in
the air</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_803000/803304.stm"> <IMG
ALIGN="left" ALT="Amazon headquarter" BORDER=0 HSPACE=5
SRC="http://news.bbc.co.uk/olmedia/800000/images/_803304_amazonsign100.jpg" WIDTH=100>
Amazon tumbles to year-low<BR> </A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_642000/642650.stm">Amazon's
fight for dominance</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_754000/754081.stm">Will
investors still turn to the web?</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/world/americas/newsid_803000/803806.stm"> <IMG
ALIGN="left" ALT="Warner Bros logo" BORDER=0 HSPACE=5
SRC="http://news.bbc.co.uk/olmedia/800000/images/_803806_wb100.jpg" WIDTH=100> Music
giants sue 'pirates'<BR> </A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/business/newsid_743000/743851.stm">EMI enters
digital music arena</A>
Link (SCALAR): <A
HREF="http://news.bbc.co.uk/hi/english/entertainment/newsid_737000/737578.stm">The
music industry's MP3 headache</A>
</p>