From fb0863238125b3a1f4ea87b1a63e0b6345ea907d Mon Sep 17 00:00:00 2001 From: mollusk Date: Wed, 6 Jul 2016 14:27:19 -0700 Subject: [PATCH] [New] grss.sh: Generic RSS Wrapper --- grss.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 grss.sh diff --git a/grss.sh b/grss.sh new file mode 100755 index 0000000..a6d1b3e --- /dev/null +++ b/grss.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +FEED_TITLE="Jitty Scripts" +FEED_URL="http://gitbutter.pw/feed/jitty-scripts.git" +RSS_READER="rsstail" +READER_OPTS="-1 -u" + +# Colors +RED='\033[0;31m' +LRED="\033[1;31m" +BLUE="\033[0;34m" +LBLUE="\033[1;34m" +GREEN="\033[0;32m" +LGREEN="\033[1;32m" +YELLOW="\033[1;33m" +CYAN="\033[0;36m" +LCYAN="\033[1;36m" +PURPLE="\033[0;35m" +LPURPLE="\033[1;35m" +BWHITE="\e[1m" +NC='\033[0m' # No Color + +if [ -f /usr/bin/${RSS_READER} ];then + printf "${LCYAN}Fetching feed for: ${FEED_TITLE}${NC}\n" + if [ "${RSS_READER}" = "rsstail" ];then + + rsstail ${READER_OPTS} ${FEED_URL} + else + ${RSS_READER} ${READER_OPTS} + fi + +else + echo "${RSS_READER} is not installed" +fi