dotfiles

beau's configuration files
git clone https://git.beauhilton.com/dotfiles.git
Log | Files | Refs | README

rssadd (353B)


      1 #!/usr/bin/env sh
      2 ! echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null &&
      3 	notify-send "That doesn't look like a full URL." && exit
      4 RSSFILE="$HOME/.config/newsboat/urls"
      5 if awk '{print $1}' "$RSSFILE" | grep "^$1$" >/dev/null; then
      6 	notify-send "You already have this RSS feed."
      7 else
      8 	echo "$1" >> "$RSSFILE" && notify-send "RSS feed added."
      9 fi