#!/usr/local/bin/ruby

require 'drb/drb'
require 'rss'
require 'rsscache'

if __FILE__ == $0
  there = ARGV.shift
  unless there
	there = "druby://otake:2858"
  end

  DRb.start_service()
  rss_cache  = DRbObject.new(nil, there)

	#a = rss_cache.get("slashdot.org", "/slashdot.rdf")
	#a = rss_cache.get("linuxtoday.com", "/backend/my-netscape.rdf")
	a = rss_cache.get("www.ale.cx", "/mine/raa-rss-1.xml")
	# here, you could present in HTML (For example)
   print "Channel: ", a.title, " - ", a.link, " - ", a.description, "\n"
   a.each_item do | it |
       print it.title, " ", it.link, "\n"
   end     
end
