Add uncategorized category

This commit is contained in:
Bernie Chiu 2014-02-18 14:36:28 +08:00
parent 5c8f822993
commit a85d87fc1f
1 changed files with 1 additions and 0 deletions

View File

@ -38,6 +38,7 @@ SITES.each_with_index do |(name, url), i|
feed.items.each do |item|
category = item.category.to_s.gsub(/\<(\/)*category\>/, '')
category = "未分類" if category.blank?
if ( item.pubDate > yesterday ) && ( CATEGORIES[i][0] == "全部" || CATEGORIES[i].include?(category) )
recent_feed[item.title.strip] = { date: item.pubDate, description: item.description.gsub("\r\n", '<br/>').strip,