diff --git a/bin/prowl-rss b/bin/prowl-rss index 0781a115..ddef2e1c 100755 --- a/bin/prowl-rss +++ b/bin/prowl-rss @@ -14,6 +14,7 @@ import feedparser import time import sys import os +import re ### @@ -63,10 +64,14 @@ try: ## fo = open(GUID_FILE, "a") for feed in feeds: - xml = feedparser.parse(feed) + f = feed.split(' ', 1) + xml = feedparser.parse(f[0]) for e in xml.entries: if e.guid not in guids: + if len(f) > 1 and not re.match(f[1], e.title): + continue + prowl_post(apikey, "RSS", e.title, "{0} - {1} <{2}>".format(e.title, xml.feed.title, e.link)) fo.write(e.guid+"\n") diff --git a/zsh/aliases b/zsh/aliases index fcae6eb5..a8082c55 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -108,7 +108,7 @@ if command_exists "ag"; then # Project-wide search 'n replace using the_silver_searcher: # https://github.com/ggreer/the_silver_searcher function agr { - ag -l "$1" | xargs repl "$1" "$2" -i + ag -l "$1" | xargs sed -i -e "s/${1/\//\\\/}/${2/\//\\\/}/g" ag "$2" } fi