From 6d8804f78bd110df180beb72fc41f9f094c004db Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 16 Oct 2008 12:20:36 +0200 Subject: 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. --- data/rbot/plugins/rss.rb | 4 ++++ 1 file changed, 4 insertions(+) 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]} " : "" -- cgit v1.2.3