jittypod.sh: a small frontend for greg
This commit is contained in:
parent
1473002b6e
commit
4492c16634
66
jittypod.sh
Executable file
66
jittypod.sh
Executable file
@ -0,0 +1,66 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
function main(){
|
||||
|
||||
echo "---------------------"
|
||||
echo " JittyPod v0.1 "
|
||||
echo "---------------------"
|
||||
|
||||
|
||||
printf "[1] - Add feeds\n\n"
|
||||
printf "[2] - Show Podcasts\n\n"
|
||||
|
||||
printf ">> "
|
||||
read choice
|
||||
|
||||
|
||||
|
||||
if [ "${choice}" = "1" ];then
|
||||
add_feeds
|
||||
|
||||
elif [ "${choice}" = "2" ];then
|
||||
show_podcasts
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function add_feeds(){
|
||||
while true;do
|
||||
echo
|
||||
printf "Podcast Name: "
|
||||
read podname
|
||||
|
||||
printf "Feed URL: "
|
||||
read feed
|
||||
|
||||
greg add "${podname}" "${feed}"
|
||||
if [ $? != 0 ];then
|
||||
printf "Greg failed to pull the feed"
|
||||
else
|
||||
echo
|
||||
echo "Podcast: ${podname} added!"
|
||||
echo "| Feed: ${feed}"
|
||||
fi
|
||||
|
||||
done
|
||||
}
|
||||
|
||||
function show_podcasts(){
|
||||
echo
|
||||
echo "-----------------"
|
||||
echo " Podcasts "
|
||||
echo "-----------------"
|
||||
echo
|
||||
greg info
|
||||
echo
|
||||
main
|
||||
}
|
||||
|
||||
function download_feeds(){
|
||||
echo
|
||||
}
|
||||
|
||||
main
|
Loading…
x
Reference in New Issue
Block a user