Add 'ytdl' script
This commit is contained in:
parent
7a9a483438
commit
e763c4a753
19
.local/bin/scripts/ytdl
Executable file
19
.local/bin/scripts/ytdl
Executable 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!"
|
Loading…
x
Reference in New Issue
Block a user