Add 'ytdl' script

This commit is contained in:
samedamci 2020-05-13 12:13:51 +02:00
parent cff956e2bf
commit 7af6fa4369
No known key found for this signature in database
GPG Key ID: FCB4A9A20D00E894

19
.local/bin/scripts/ytdl Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
# Simple youtube-dl wrapper script for better user syntax.
Y() { youtube-dl -i -4 -o "%(title)s.%(ext)s" "$@"; }
audio() {
Y -x --audio-format opus --audio-quality 0 "$@"
}
video() {
Y -f best "$@"
}
thumbnail() {
Y --write-thumbnail --skip-download "$@"
}
"$1" "$2" && notify-send " Downloaded!"