summaryrefslogtreecommitdiffstats
path: root/.scripts/tools
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-03-12 21:20:17 -0400
committerLuke Smith <luke@lukesmith.xyz>2019-03-12 21:20:17 -0400
commit1acd5c621883143c6ae8d47bfb95937f4850844b (patch)
tree6d6663370a731af95dcac955db42fbbd5ba76332 /.scripts/tools
parentb74f98ede6fa6aa4bb03fd7775be5e35f790d7e9 (diff)
downloadeibhear-1acd5c621883143c6ae8d47bfb95937f4850844b.tar.gz
eibhear-1acd5c621883143c6ae8d47bfb95937f4850844b.tar.zst
eibhear-1acd5c621883143c6ae8d47bfb95937f4850844b.zip
mimeapps cleanup; rss added
Diffstat (limited to '.scripts/tools')
-rwxr-xr-x.scripts/tools/rssadd9
1 files changed, 9 insertions, 0 deletions
diff --git a/.scripts/tools/rssadd b/.scripts/tools/rssadd
new file mode 100755
index 0000000..e90dcf2
--- /dev/null
+++ b/.scripts/tools/rssadd
@@ -0,0 +1,9 @@
+#!/bin/sh
+! echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null &&
+ notify-send -i "$PIX/rss.svg" "That doesn't look like a full URL." && exit
+RSSFILE="$HOME/.config/newsboat/urls"
+if awk '{print $1}' "$RSSFILE" | grep "^$1$" >/dev/null; then
+ notify-send -i "$PIX/rss.svg" "You already have this RSS feed."
+else
+ echo "$1" >> "$RSSFILE" && notify-send -i "$PIX/rss.svg" "RSS feed added."
+fi