summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-10-16 12:20:36 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-10-16 12:20:36 +0200
commit6d8804f78bd110df180beb72fc41f9f094c004db (patch)
treec4d199bfd58f8b7ad4c87118c03b5f4d6c900ece
parentedd96f72c05cda50e43c088f26c4a92f0e1fd46a (diff)
rss plugin: 'headlines' output format
A simple output format that only provides feed titles, skipping all other data, including the feed link. Requested by step on #rbot.
-rw-r--r--data/rbot/plugins/rss.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb
index c4814cf5..7c1d2dbe 100644
--- a/data/rbot/plugins/rss.rb
+++ b/data/rbot/plugins/rss.rb
@@ -314,6 +314,10 @@ class RSSFeedsPlugin < Plugin
# TODO: load personal ones
def define_filters
@outkey = :"rss.out"
+ @bot.register_filter(:headlines, @outkey) { |s|
+ line1 = "%{handle}%{title}"
+ make_stream(line1, nil, s)
+ }
@bot.register_filter(:blog, @outkey) { |s|
author = s[:author] ? (s[:author] + " ") : ""
abt = s[:category] ? "about #{s[:category]} " : ""