#!/usr/bin/env perl use strict; use warnings; use Perlanet::Simple; use Getopt::Std; use File::Basename; use vars qw{$VERSION}; BEGIN { $VERSION = $Perlanet::VERSION; } my %opts; getopts('hv', \%opts); version() if $opts{v} || $opts{h}; help() if $opts{h}; exit if $opts{v} || $opts{h}; my $cfg = shift || './perlanetrc'; my $p = Perlanet::Simple->new_with_config(configfile => $cfg); $p->run; sub version { my ($me) = fileparse $0; print "\n$me, version $VERSION\n\n"; } sub help { my ($me) = fileparse $0; print < is a command line program for aggregating web feeds (both Atom and RSS) and publishing a new web page and a new web feed containing the results of that aggregation. =head1 COMMAND LINE ARGUMENTS C takes one optional command line argument, which is the name of a configuration file to use. If no filename is given then the program looks for a file called C in the current directory. =head1 CONFIGURATION FILE C requires a configuration file which contains details of which feeds to aggregate and what to do with the results of the aggregation. By default, C looks for a file called C in the current directory, but this name can be overridden by passing the name of a different file when calling the program. The configuration file is in YAML format. YAML is a simple text-based file format. See L for further details. =head2 Configuration Options The configuration file can contain the following options. =over 4 =item title The title of the resulting page and web feed. This option is mandatory. =item description The description of the resulting page and web feed. This option is mandatory. =item url A URL which will be associated with the resulting page and web feed. This will usually be the address where the web page will be published. This option is mandatory. =item author The name and email address of the author of the aggregated content. This item has two sub-items - one each for the name and email address. This option is mandatory. =item agent This optional entry defines the agent string that perlanet will use when requesting data from web sites. It's the name of the program that site owners will see in their web site access logs. Although it is optional, it is strongly recommended that you give a value for this configuration option and that the value you use includes contact details so that web site owners can get in touch with you if they have any concerns about your use of their site. =item entries The maximum number of entries to include in the aggregated content. This option is mandatory. =item entries_per_feed The C value above defines the total number of entries in the aggregated output feed. The value defines the number of entries to take from each of your source feeds. For example, if this is set to 1 then there will only be one entry from each feed in your output. If this value is 0 (or missing) then all values from all source feeds are used. =item opml The system can optionally create an OPML file containing details of the feeds which are being aggregated. This optional option controls whether or not this file is created. If it exists, it should be the name of the OPML file to be created. If an OPML file is being created, then the C options (described below) will all require a C sub-option. =item page This mandatory option contains the details of the web page to be created. There are two sub-options - C gives the name of the file to be created and C