2

I want to provide feed in my merb application. After reading wikipedia, RSSvsAtom and seeing that StackOverflow uses it, I think I will use Atom. What library should I use? I have found rAtom that looks quite good. Are there better alternatives? Or does merb has anything built in to help me?

UPDATE: maybe I should just do the news in plain html and use FeedBurner?

Community
  • 1
  • 1
rkj
  • 8,787
  • 2
  • 29
  • 35

2 Answers2

0

While not Merb specific, you might consider using FeedTools - which is a Ruby Gem.

You'd do something like:

require 'feed_tools'
feed = FeedTools::Feed.open('http://url/feed')

feed.items.each do |item|
  puts item.title + "\n---\n" + item.description + "\n\n"
end

Anyway - check it out at http://sporkmonger.com/projects/feedtools

NOTE: This is for parsing ATOM feeds as I wasn't clear as to whether or not you were looking to provide an ATOM feed or parse others.

Tim Knight
  • 8,346
  • 4
  • 33
  • 32
0

I went for rAtom and for now, and it works really good - code is minimal and nice.

rkj
  • 8,787
  • 2
  • 29
  • 35