2019-08-18 16:28:11 +00:00
|
|
|
#!/usr/bin/env sh
|
2019-03-13 01:20:17 +00:00
|
|
|
! echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null &&
|
2019-03-20 18:45:08 +00:00
|
|
|
notify-send "That doesn't look like a full URL." && exit
|
2019-03-13 01:20:17 +00:00
|
|
|
RSSFILE="$HOME/.config/newsboat/urls"
|
|
|
|
if awk '{print $1}' "$RSSFILE" | grep "^$1$" >/dev/null; then
|
2019-03-20 18:45:08 +00:00
|
|
|
notify-send "You already have this RSS feed."
|
2019-03-13 01:20:17 +00:00
|
|
|
else
|
2019-03-20 18:45:08 +00:00
|
|
|
echo "$1" >> "$RSSFILE" && notify-send "RSS feed added."
|
2019-03-13 01:20:17 +00:00
|
|
|
fi
|