|
Babble - RSS Feed Aggregator and Blog engine |
Babble - RSS Feed Aggregator and Blog engine
use Babble; use Babble::DataSource::RSS;
my $babble = Babble->new ();
$babble->add_params (meta_title => "Example Babble");
$babble->add_sources (
Babble::DataSource::RSS->new (
-id => "Gergely Nagy",
-location => 'http://bonehunter.rulez.org/~algernon/blog/index.xml',
-lwp => {
agent => "Babble/" . $Babble::VERSION . " (Example)"
}
)
);
$babble->collect_feeds ();
print $babble->output (-theme => "sidebar");
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.
Babble has a handful of methods, all of them will be enumerated here.
Calling happens before the collect itself starts.
Calling happens after the collect itself ended.
As a side-effect, new() will try to load the cache.
See the documentation of the relevant output method for details.
Please note that this must be called before the output method!
Parameters - if any - must be passed as HASH reference!
Parameters - if any - must be passed as HASH reference!
The called module needs to be named Babble::Output::$type or Babble::Theme::$theme, and must be a Babble::Output descendant.
See the Babble::Document manpage for more information about filters.
Processors are subroutines that take four arguments: An item, a
channel, a source, and a Babble object (the caller). All of
them are references.
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.
Gergely Nagy, algernon@bonehunter.rulez.org
Bugs should be reported at http://bugs.bonehunter.rulez.org/babble.
Babble::DataSource, Babble::Document, Babble::Document::Collection, Babble::Output, Babble::Theme, Babble::Processors, Babble::Cache
|
Babble - RSS Feed Aggregator and Blog engine |