|
NAMEPerlanet - A program for creating programs that aggregate web feeds (both RSS and Atom).SYNOPSISmy $perlanet = Perlanet->new; $perlanet->run; DESCRIPTIONPerlanet is a program for creating programs that aggregate web feeds (both RSS and Atom). Web pages like this are often called "Planets" after the Python software which originally popularised them. Perlanet is a planet builder written in Perl - hence "Perlanet".You are probably interested in Perlanet::Simple to get started straight out of the box, batteries included style. Perlanet itself is the driving force behind everything, however. Perlanet reads a series of web feeds (filtering only those that are valid), sorts and selects entries from these web feeds, and then creates a new aggregate feed and renders this aggregate feed. Perlanet allows the user to customize all of these steps through subclassing and roles. For most uses, you probably don't want to use the Perlanet module. The perlanet command line program is far more likely to be useful. CONSTRUCTORnewmy $perlanet = Perlanet->new The constructor method. Can be passed a hashref of initialisers. See "ATTRIBUTES" below for details of the key/value pairs to pass in. ATTRIBUTES
METHODSfetch_pageAttempt to fetch a web page and a returns a URI::Fetch::Response object.fetch_feedsCalled internally by "run" and passed the list of feeds in "feeds".Attempt to download all given feeds, as specified in the "feeds" attribute. Returns a list of Perlanet::Feed objects, with the actual feed data loaded. NB: This method also modifies the contents of "feeds". select_entriesCalled internally by "run" and passed the list of feeds from "fetch_feeds".Returns a combined list of Perlanet::Entry objects from all given feeds. sort_entriesCalled internally by "run" and passed the list of entries from "select_entries".Sort the given list of entries into created/modified order for aggregation, and filters them if necessary. Takes a list of Perlanet::Entrys, and returns an ordered list. cutoff_entriesCalled internally by "run" and passed the list of entries from "sort_entries".Removes any entries that were published earlier than the cut-off date for this feed. build_feedCalled internally by "run" and passed the list of entries from "sort_entries".Takes a list of Perlanet::Entrys, and returns a Perlanet::Feed that is the actual feed for the planet. clean_htmlClean a HTML string so it is suitable for display.Takes a HTML string and returns a "cleaned" HTML string. clean_entriesClean all entries for the planet.Takes a list of entries, runs them through "clean" and returns a list of cleaned entries. renderCalled internally by "run" and passed the feed from "build_feed".This is the hook where you generate some type of page to display the result of aggregating feeds together (ie, inserting the posts into a database, running a HTML templating library, etc) Takes a Perlanet::Feed as input (as generated by build_feed. runThe main method which runs the perlanet process.TO DOSee <http://wiki.github.com/davorg/perlanet/issues>SUPPORTTo report bugs in Perlanet, please use the CPAN request tracker. You can either use the web page at <http://rt.cpan.org/Public/Bug/Report.html?Queue=Perlanet> or send an email to bug-Perlanet@rt.cpan.org.SEE ALSO
AUTHORDave Cross, <dave@perlhacks.com>COPYRIGHT AND LICENSECopyright (c) 2010 by Magnum Solutions Ltd.This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
Visit the GSP FreeBSD Man Page Interface. |