mirror of
				https://github.com/tiyn/dotfiles.git
				synced 2025-10-31 04:21:15 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			10 lines
		
	
	
		
			345 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			345 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/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
 |