• Stars
    star
    222
  • Rank 172,690 (Top 4 %)
  • Language
    Ruby
  • License
    Other
  • Created almost 16 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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.

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

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
SimpleRSS.item_tags << :"media:content#url" # this will grab the url attribute of the media:content tag 

Authors

Inspired by Blagg from Rael Dornfest.

This library is released under the terms of the GNU LGPL.

More Repositories

1

classifier

A general classifier module to allow Bayesian and other types of classifications.
Ruby
658
star
2

contacts

A universal interface to import email contacts from various providers including Yahoo, Gmail, Hotmail, AOL and Plaxo.
Ruby
612
star
3

shipping

An easy to use shipping API for Ruby. Shipping is used to calculate shipping costs, track orders and other shipping based processes through major shipping companies such as, UPS and Fedex, etc.
Ruby
44
star
4

starfish

Starfish is a utility to make distributed programming ridiculously easy
Ruby
41
star
5

payment

An easy to use payment gateway for Ruby. Payment is used to process credit cards and electronic cash through merchant accounts like Authorize.Net.
Ruby
20
star
6

lucash

A highly dynamic programming language/shell environment with data structures
Scheme
8
star
7

github-contest

Woot!
Ruby
8
star
8

dm-works

Fork of DataMapper 0.3 with patches to fix major show-stopping bugs
Ruby
5
star
9

PyAMF

Python AMF
Python
5
star
10

dm-www

The DataMapper Website
Ruby
3
star
11

dm-more

Extras for DataMapper, including bridges to DataObjects::Migrations and Merb::DataMapper
Ruby
3
star
12

do

DataObjects
Ruby
3
star
13

dm-core

DataMapper - Core
Ruby
3
star
14

tesh

A highly dynamic shell/programming language environment with data structures written in Crystal
Crystal
3
star
15

standard_failure

A rails plugin for handling standard failures in an app
Ruby
2
star
16

copypaste

CopyPaste provides rcopy, rcut, rpaste unix tools that interact with a central queue server through the memcached protocol
Ruby
2
star
17

lucas-panamax-templates

1
star