tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

commit 3fc2d99ec3442e30cb382da77a5722b4fe1af7cd
parent 2fb7891299d34815f0b6aadea075bc2660313a63
Author: rob <rob@tarina.org>
Date:   Fri, 14 Jun 2019 15:55:33 +0300

youtube uploader ask for info

Diffstat:
Mmods/youtube-upload.sh | 26+++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/mods/youtube-upload.sh b/mods/youtube-upload.sh @@ -4,4 +4,28 @@ # $2 filename PATH=`pwd` -/usr/bin/python3 $PATH/mods/youtube-upload/youtube_upload/__main__.py --title="$1" $2.mp4 +echo 'Youtube Title: ' +read title +echo 'Description: ' +read description + +while true; do + read -p 'Do you want your video public (y)es (n)o?:' yn + case $yn in + [Yy]* ) privacy='public' ; break ;; + [Nn]* ) privacy='private'; break;; + * ) echo "Please answer yes or no.";; + esac +done + +while true; do + echo "Do you want to upload video $title with description $description to a $privacy Youtube video?" + read -p 'Is this correct (y)es (n)o?:' yn + case $yn in + [Yy]* ) echo "OK!" ; break ;; + [Nn]* ) echo "NOPE!" ; exit;; + * ) echo "Please answer yes or no.";; + esac +done + +/usr/bin/python3 $PATH/mods/youtube-upload/youtube_upload/__main__.py --title="$title" --description="$description" --privacy="$privacy" $2.mp4