tarina

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

youtube-upload.sh (1438B)


      1 #!/bin/sh
      2 # YOUTUBE-UPLOAD MOD
      3 # $1 filmtitle
      4 # $2 filename
      5 PATH=`pwd`
      6 
      7 printf "\033c"
      8 
      9 /bin/cat <<'EOF'     
     10 
     11                              _                          _                 _ 
     12                    _        | |                        | |               | |
     13  _   _  ___  _   _| |_ _   _| | _   ____    _   _ ____ | | ___   ____  _ | |
     14 | | | |/ _ \| | | |  _) | | | || \ / _  )  | | | |  _ \| |/ _ \ / _  |/ || |
     15 | |_| | |_| | |_| | |_| |_| | |_) | (/ /   | |_| | | | | | |_| ( ( | ( (_| |
     16  \__  |\___/ \____|\___)____|____/ \____)   \____| ||_/|_|\___/ \_||_|\____|
     17 (____/                                           |_|                        
     18     
     19 
     20 EOF
     21 read -p "Youtube film title: " title
     22 read -p "Film description: " description
     23 
     24 
     25 while true; do
     26     read -p 'Do you want your video public (y)es (n)o?:' yn
     27     case $yn in
     28         [Yy]* ) privacy='public' ; break ;;
     29         [Nn]* ) privacy='private'; break;;
     30         * ) echo "Please answer yes or no.";;
     31     esac
     32 done
     33 
     34 while true; do
     35     echo "Do you want to upload video $title with description $description to a $privacy Youtube video?"
     36     read -p 'Is this correct (y)es (n)o?:' yn
     37     case $yn in
     38         [Yy]* ) echo "OK!" ; break ;;
     39         [Nn]* ) echo "NOPE!" ; exit;;
     40         * ) echo "Please answer yes or no.";;
     41     esac
     42 done
     43 
     44 /usr/bin/python3 $PATH/mods/youtube-upload/youtube_upload/__main__.py --title="$title" --description="$description" --privacy="$privacy" $2