Url Opener Script Termux

URL Opener Script Termux


#!/data/data/com.termux/files/usr/bin/zsh
#
# This is a termux-url-opener script to do diffrent tasks on my Android phone
#

url=$1
echo "What should I do with $url ?"
echo "y) download youtube video to movies-folder"
echo "u) download youtube video and convert it to mp3 (music-folder)"
echo "s) download with scdl (soundcloud)"
echo "w) wget file to download-folder"
echo "x) nothing"

read CHOICE
case $CHOICE in
y)
youtube-dl -o /data/data/com.termux/files/home/storage/shared/Movies/%(title)s.%(ext)s $url
;;
u)
echo "Artist"
read artist
echo "Title"
read title
echo "Album"
read album
youtube-dl -o ~/storage/music/music.flv $url
ffmpeg -i ~/storage/music/music.flv ~/storage/music/$artist-$title.mp3
mid3v2 -a $artist -t $title -A $album ~/storage/music/$artist-$title.mp3
rm ~/storage/music/music.flv
;;
s)
scdl -l $url --path ~/storage/music
echo "s need some work"
;;
w)
cd ~/storage/downloads
wget $url
;;
x)
echo "bye"
;;
esac

Article By https://web-manajemen.blogspot.com

Leave a Reply

Your email address will not be published. Required fields are marked *