8000 GitHub - kabobbob/rubyrss
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

kabobbob/rubyrss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RubyRSS
Eating feeds tastefully

Elegant as Ruby RSS parser and generator intended to help you
bring together Ruby and RSS in your project. Features include
creation of custom (x)HTML news blocks from remote RSS feeds,
generation of RSS feeds using templates, and more.

RubyRSS depends on SimpleRSS library. To install it you can
use following command:

> gem install simple-rss --remote


HOW TO PARSE RSS-FEED

require "rubyrss"

rss = RubyRSS.new "http://www.games-mix.com/rss-feed.xml"
rss.parse


HOW TO GENERATE RSS-FEED

require "rubyrss"

rss = RubyRSS.new "rss-feed.xml"
rss.title = "Sample RSS-feed"
rss.link = "http://www.rubyrss.com"
rss.desc = "Sample RSS-feed generated by RubyRSS"
rss.date = Time.now.gmtime
1.upto(10) { |i|
  rss.items << RubyRSS::Item.new(
    "title-" + i.to_s,
    "#" + String(i),
    "description-#{i}",
    Time.now.gmtime
  )
}
rss.generate "rss2.0"


CHANGES
v1.1 Jun 10
* return string with content instead of direct printing when
  invoking #parse and #generate
* checking for presence of feed description
* added requirement of simple-rss to README

v1.0 Jun 09
* initial release

Copyright (c) 2006 Sergey Tikhonov <st@dairon.net>
Distributed under MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0