Sha256: 1b551c5084d9fa5eb8187ed8fbcf61f458c9646762eab7bed2c2852c18e24884
Contents?: true
Size: 1.97 KB
Versions: 8
Compression:
Stored size: 1.97 KB
Contents
## Welcome to Simple RSS Simple RSS is a simple, flexible, extensible, and liberal RSS and Atom reader for Ruby. It is designed to be backwards compatible with the standard RSS parser, but will never do RSS generation. ## Download * gem install rrsimple-rss * https://github.com/rrmartins/rrsimple-rss * git clone git@github.com:rrmartins/rrsimple-rss.git ### Usage The API is similar to Ruby's standard RSS parser: require 'rubygems' require 'rrsimple-rss' require 'open-uri' rss = RRSimpleRSS.parse open('http://slashdot.org/index.rdf') rss.channel.title # => "Slashdot" rss.channel.link # => "http://slashdot.org/" rss.items.first.link # => "http://books.slashdot.org/article.pl?sid=05/08/29/1319236&from=rss" But since the parser can read Atom feeds as easily as RSS feeds, there are optional aliases that allow more atom like reading: rss.feed.title # => "Slashdot" rss.feed.link # => "http://slashdot.org/" rss.entries.first.link # => "http://books.slashdot.org/article.pl?sid=05/08/29/1319236&from=rss" The parser does not care about the correctness of the XML as it does not use an XML library to read the information. Thus it is flexible and allows for easy extending via: RRSimpleRSS.feed_tags << :some_new_tag RRSimpleRSS.item_tags << :"item+myrel" # this will extend RRSimpleRSS to be able to parse RSS items or ATOM entries that have a rel specified, common in many blogger feeds RRSimpleRSS.item_tags << :"feedburner:origLink" # this will extend RRSimpleRSS to be able to parse RSS items or ATOM entries that have a specific pre-tag specified, common in many feedburner feeds RRSimpleRSS.item_tags << :"media:content#url" # this will grab the url attribute of the media:content tag ## Authors * Lucas Carlson (mailto:lucas@rufy.com) * Herval Freire (mailto:hervalfreire@gmail.com) Inspired by [Blagg](http://www.raelity.org/lang/perl/blagg) from Rael Dornfest. This library is released under the terms of the GNU LGPL.
Version data entries
8 entries across 8 versions & 1 rubygems