-
-
Save jonschoning/00e26338bca0dee939a8d492e0cc41bb to your computer and use it in GitHub Desktop.
termux-url-opener
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment