From 54920103c2843f5a3620effbccaceaee7f6885c1 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 18 May 2019 00:07:32 -0400 Subject: scripts moved to ~/.local/bin --- .local/bin/tools/rssadd | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 .local/bin/tools/rssadd (limited to '.local/bin/tools/rssadd') diff --git a/.local/bin/tools/rssadd b/.local/bin/tools/rssadd new file mode 100755 index 0000000..8822fc5 --- /dev/null +++ b/.local/bin/tools/rssadd @@ -0,0 +1,9 @@ +#!/bin/sh +! echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null && + notify-send "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 "You already have this RSS feed." +else + echo "$1" >> "$RSSFILE" && notify-send "RSS feed added." +fi -- cgit v1.3.1