\r
require 'rss'\r
\r
-# Add support for Slashdot namespace in RDF. The code is just an adaptation of\r
-# the DublinCore code.\r
module ::RSS\r
\r
# Make an 'unique' ID for a given item, based on appropriate bot options\r
[item.title, item.link, desc].hash\r
end\r
\r
+ # Add support for Slashdot namespace in RDF. The code is just an adaptation\r
+ # of the DublinCore code.\r
unless defined?(SLASH_PREFIX)\r
SLASH_PREFIX = 'slash'\r
SLASH_URI = "http://purl.org/rss/1.0/modules/slash/"\r
link = item.link.chomp if item.link\r
\r
debug item.inspect\r
- category = item.dc_subject rescue item.category rescue nil\r
+ category = item.dc_subject rescue item.category.content rescue nil\r
+ category = nil if category and category.empty?\r
author = item.dc_creator rescue item.author rescue nil\r
+ author = nil if author and author.empty?\r
\r
line1 = nil\r
line2 = nil\r
at = ((item.title && item.link) ? ' @ ' : '')\r
case feed.type\r
when 'blog'\r
+ author << " " if author\r
abt = category ? "about #{category} " : ""\r
- line1 = "#{handle}#{date}#{author} blogged #{abt}at #{link}"\r
+ line1 = "#{handle}#{date}#{author}blogged #{abt}at #{link}"\r
line2 = "#{handle}#{title} - #{desc}"\r
when 'forum'\r
line1 = "#{handle}#{date}#{title}#{at}#{link}"\r