diff --git a/youtube b/youtube index ba2fcb5..77e9b80 100755 --- a/youtube +++ b/youtube @@ -1,10 +1,17 @@ #!/bin/sh +c_red="\033[1;31m" +c_green="\033[1;32m" +c_yellow="\033[1;33m" +c_blue="\033[1;34m" +c_magenta="\033[1;35m" +c_cyan="\033[1;36m" +c_reset="\033[0m" + full_video() { video=$1 - printf "$video" youtube-dl -f best "$video" } @@ -12,17 +19,17 @@ full_video() part_video() { video=$1 - printf "Enter Starting Point(hh:mm:ss):" + printf "${c_magenta}Enter Starting Point(hh:mm:ss)or(mm:ss)${c_reset}:" read start - printf "Enter Duration:" + printf "${c_yellow}Enter Duration(seconds):${c_cyan}" read dur ffmpeg -i $(youtube-dl -f best --get-url "$video") -ss $start -t $dur $HOME/Videos/$(date +%s).mp4 } -printf "Input Youtube link :" +printf "${c_blue}Input Youtube link :${c_magenta}" read x -printf "Download>>\n[f]Full video\n[p]Part of video" -printf "\nEnter choice:" +printf "${c_yellow}Download>>\n${c_green}[f]Full video\n${c_cyan}[p]Part of video\n${c_red}[q]Quit" +printf "\n${c_reset}Enter choice:${c_green}" read choice case $choice in f)