github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

cardmagic / simple-rss

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 29
    • 4
  • Source
  • Commits
  • Network (4)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

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. — Read more

  cancel

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

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Fixes to remove some eval code 
cardmagic (author)
Mon Jun 22 20:42:03 -0700 2009
commit  0915f343a623e4fd080f78d0858b1ff788681ec3
tree    c5bd3c7c5536f6a24117c8302a7bd487dca759c4
parent  c9757d26031dbf8837edb62f7445fd28d5fb5ccb
simple-rss /
name age
history
message
file .gitignore Tue Jul 15 15:34:48 -0700 2008 Adding gemspec and ignore [cardmagic]
file LICENSE Thu Feb 02 08:29:17 -0800 2006 Adding the files git-svn-id: svn+ssh://rubyfor... [cardmagic]
file README Wed Feb 25 14:54:11 -0800 2009 Updating SimpleRSS [cardmagic]
file Rakefile Thu Feb 02 08:29:17 -0800 2006 Adding the files git-svn-id: svn+ssh://rubyfor... [cardmagic]
file install.rb Thu Feb 02 08:29:17 -0800 2006 Adding the files git-svn-id: svn+ssh://rubyfor... [cardmagic]
directory lib/ Mon Jun 22 20:42:03 -0700 2009 Fixes to remove some eval code [cardmagic]
file simple-rss.gemspec Mon Jun 22 20:42:03 -0700 2009 Fixes to remove some eval code [cardmagic]
directory test/ Mon Jun 22 20:42:03 -0700 2009 Fixes to remove some eval code [cardmagic]
README
== 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 simple-rss
* http://rubyforge.org/projects/simple-rss
* svn co http://rufy.com/svn/simple-rss/trunk

=== Usage
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
   SimpleRSS.item_tags << :"item+myrel" # this will extend SimpleRSS to be able to parse RSS items or ATOM entries that 
   have a rel specified, common in many blogger feeds
   SimpleRSS.item_tags << :"feedburner:origLink" # this will extend SimpleRSS to be able to parse RSS items or ATOM 
   entries that have a specific pre-tag specified, common in many feedburner feeds


== Authors
* Lucas Carlson  (mailto:lucas@rufy.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.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server