From 1a8ee716f32d13b06271780bafac9fdeb02a3c3e Mon Sep 17 00:00:00 2001 From: pictuga Date: Thu, 6 Nov 2014 21:11:23 +0100 Subject: [PATCH] Add "search" option PLEASE NOTE that this is case sensitive and does really basic research ("is xyz in the title?"). Don't use this for fine filtering. Also fixed an issue with After(), due to the fact that some functions were removing items from the feed while looping over the feed items, creating some anoying item-skipping issues. --- morss/morss.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/morss/morss.py b/morss/morss.py index 34f7ee0..4aa4bf4 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -669,7 +669,11 @@ def Gather(rss, url, cache, options): def After(rss, options): - for i, item in enumerate(rss.items): + for i, item in enumerate(list(rss.items)): + if options.search: + if options.search not in item.title: + item.remove() + continue if item.desc and item.content: if options.clip: