Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[ANN] Simple RSS for Ruby

9 views
Skip to first unread message

Lucas Carlson

unread,
Sep 6, 2005, 6:39:47 PM9/6/05
to
I have just released a new library for Ruby:

http://simple-rss.rubyforge.org/

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.

The API is similar to Ruby's standard RSS parser:

require 'rubygems'
require 'simple-rss'
require 'open-uri'

rss = SimpleRSS.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:

SimpleRSS.feed_tags << :some_new_tag

This library was inspired by Blagg
(http://www.raelity.org/lang/perl/blagg) from Rael Dornfest.

I hope you enjoy and find this useful.

Lucas Carlson

unread,
Sep 6, 2005, 6:44:12 PM9/6/05
to
By the way, to install:

gem install simple-rss

mathew

unread,
Sep 7, 2005, 1:43:52 PM9/7/05
to
Lucas Carlson wrote:
> By the way, to install:
>
> gem install simple-rss

# gem install simple-rss
Attempting local installation of 'simple-rss'
Local gem file not found: simple-rss*.gem
Attempting remote installation of 'simple-rss'
Successfully installed simple-rss-1.0.0
Installing RDoc documentation for simple-rss-1.0.0...

lib/simple-rss.rb:25:68: ':' not followed by identified or operator

lib/simple-rss.rb:28:33: ':' not followed by identified or operator

lib/simple-rss.rb:28:53: ':' not followed by identified or operator

lib/simple-rss.rb:29:29: ':' not followed by identified or operator

lib/simple-rss.rb:29:42: ':' not followed by identified or operator

lib/simple-rss.rb:29:57: ':' not followed by identified or operator

lib/simple-rss.rb:29:71: ':' not followed by identified or operator

lib/simple-rss.rb:29:88: ':' not followed by identified or operator


mathew
--
<URL:http://www.pobox.com/~meta/>
WE HAVE TACOS

Austin Ziegler

unread,
Sep 7, 2005, 2:25:20 PM9/7/05
to
On 9/7/05, mathew <me...@pobox.com> wrote:
> lib/simple-rss.rb:25:68: ':' not followed by identified or operator
> lib/simple-rss.rb:28:33: ':' not followed by identified or operator
> lib/simple-rss.rb:28:53: ':' not followed by identified or operator
> lib/simple-rss.rb:29:29: ':' not followed by identified or operator
> lib/simple-rss.rb:29:42: ':' not followed by identified or operator
> lib/simple-rss.rb:29:57: ':' not followed by identified or operator
> lib/simple-rss.rb:29:71: ':' not followed by identified or operator
> lib/simple-rss.rb:29:88: ':' not followed by identified or operator

These are just a single RDoc bug, nothing to be worried about.

-austin
--
Austin Ziegler * halos...@gmail.com
* Alternate: aus...@halostatue.ca


0 new messages