NAME

News::Search - Usenet news searching toolkit

SYNOPSIS

use News::Search;

my @newsgroups = ( "cups.general", "cups.bugs" );
my %args = ( subject => 'die|break|broke' );

my $ns = News::Search->new(\@newsgroups, \%args);
my %newsarticles = $ns->SearchNewsgroups;

DESCRIPTION

News::Search searches Usenet news postings.

It can be used to search local news groups that google doesn't cover. Or, even for news groups that are covered by google, it can give you all the hits in one file, in the format that you prescribed.

You can also adapt the news-search and put it into the cron job to watch for specific news groups for specific criteria and mail you reports according to the interval you set.

METHODS

News::Search->new($newsgroups_array_ref, $criteria_hash_ref[, $limit])

News::Search->new( ["cups.general", "cups.bugs"],
  { subject => 'die|break|broke' } )

criteria_hash_ref takes a hash of params, as follows:

  • subject=pattern, look in the Subject: line.

  • from=pattern, look for author in the From: line.

  • body=pattern, look in article body.

The above pattern match keyword can also be prefixed with 'no', e.g.,

nosubject=pattern

to ignore messages if pattern found in the Subject: line.

SearchNewsgroups

Search the given newsgroups with the given criteria:

my %newsarticles = $ns->SearchNewsgroups;

foreach my $article (values %newsarticles) {
  # deal with  $article->{"SUBJECT"}, @{$article->{"HEADER"}})
  #  and $article->{"BODY"}
}

BUGS

Please report any bugs or feature requests to bug-news-search at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=News-Search. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc News::Search

You can also look for information at:

AUTHOR

SUN, Tong <suntong at cpan.org> http://xpt.sourceforge.net/

COPYRIGHT

Copyright 2003-2008 Tong Sun, all rights reserved.

This program is released under the BSD license.