NAME Babble - RSS Feed Aggregator and Blog engine SYNOPSIS use Babble; use Babble::DataSource::HTTP; my $babble = Babble->new (); $babble->add_params (meta_title => "Example Babble"); $babble->add_source ( Babble::DataSource::HTTP->new ( -id => "Gergely Nagy", -user_agent => "Babble/0.01 (Example)", -url => 'http://midgard.debian.net/~algernon/blog/index.xml'); $babble->collect_feeds (); $babble->split_items (); print $babble->output (-type => "HTML", -template = "themes/sidebar/sidebar.tmpl"); DESCRIPTION "Babble" is a system to collect, process and display RSS feeds. Designed in a straightforward and extensible manner, "Babble" provides near unlimited flexibility. Even though it provides lots of functionality, the basic usage is pretty simple, and only a few lines. However, would one want to add new feed item processor functions, that is. also trivial to accomplish. In the default install, two output types are provided: HTML via "HTML::Template" and RSS via "XML::RSS". New formats are also trivial to add. METHODS "Babble" has a handful of methods, all of them will be enumerated here. *new*() Creates a new Babble object. Arguments to the *new* method are listed below, all of them are optional. All arguments passed to *new* will be stored without parsing, for later use by processors and other extensions. -processors An array of subroutines that Babble will run for each and every item it processes. See the PROCESSORS section for more information about these matters. *add_params*(%params) Add custom paramaters to the Babble object, which might be usable for the output generation routines. See the documentation of the relevant output method for details. *add_sources*(@sources) Adds multiple sources in one go. *collect_feeds*() Retrieve and process the feeds that were added to the Babble. All processor routines will be run by this very method. Please note that this must be called before the *output* method, and even before *sort_items*, as neither will automatically call it. *split_items*() Split the retrieved feed items into an array of dates. So items submitted on the same date will be kept near each other. The structure of the resulting hash ("$self-"{Dates}>) is something like this: $self->{Dates} = { "2004-02-01" => { date => "2004-02-01", items => @list_of_items } }; This resulting hash is required by most the output methods. *output*(%params) Generate the output. This methods recognises two arguments: "type", which determines what output method will be used for the actual output itself, and "theme", which overrides this, and uses a theme engine instead. (A theme engine is simply a wrapper around a specific output method, with some paramaters pre-filled.) The called module needs to be named "Babble::Output::$type" or "Babble::Theme::$theme", and must be a Babble::Output descendant. PROCESSORS Processors are subroutines that take four arguments: An *item*, a *channel*, a *source*, and a "Babble" object (the caller). An *item* is a Babble::Document object, *channel* is a Babble::Document::Collection object, and *source* is a Babble::DataSource object. Preprocessors operate on *item* in-place, doing whatever they want with it, being it adding new fields, modifying others or anything one might come up with. A default set of preprocessors, which are always run first (unless special hackery is in the works), are provided in the "Babble::Processors" module. Since they are automatically used, one does not need to add them explicitly. AUTHOR Gergely Nagy, algernon@bonehunter.rulez.org Bugs should be reported at <http://mantis.bonehunter.rulez.org/>. SEE ALSO Babble::DataSource, Babble::Document, Babble::Document::Collection, Babble::Output, Babble::Theme, Babble::Processors