X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Frss.rb;h=9e85b416bb6bc6db5a50994008653e29a13c5087;hb=41ea4232df0ed0b3f922b0476444ca8e38f3301f;hp=c4814cf577757fc7675fa307b8566f60e6fc9f18;hpb=edd96f72c05cda50e43c088f26c4a92f0e1fd46a;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index c4814cf5..9e85b416 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 = (s[:handle].empty? ? "%{date}" : "%{handle}") << "%{title}" + make_stream(line1, nil, s) + } @bot.register_filter(:blog, @outkey) { |s| author = s[:author] ? (s[:author] + " ") : "" abt = s[:category] ? "about #{s[:category]} " : "" @@ -1149,7 +1153,7 @@ class RSSFeedsPlugin < Plugin report_problem("no items found in the feed, maybe try weed?", e, m) return nil end - feed.title = title + feed.title = title.strip feed.items = items return true end