summaryrefslogtreecommitdiff
path: root/scripts/sh/dlm
diff options
context:
space:
mode:
authorGeorge Abbott <george@gabbott.dev>2025-01-26 11:37:22 +0000
committerGeorge Abbott <george@gabbott.dev>2025-01-26 11:37:22 +0000
commit82abadcecc7534b4847238ee2a977f33256b0439 (patch)
treead8752c1dc9914829e80bc2f3f1a45dfec8f4b4a /scripts/sh/dlm
parentbac748dbe8c28cf1ed3b387b24f89ffe5a58ffc9 (diff)
sh
Diffstat (limited to 'scripts/sh/dlm')
-rwxr-xr-xscripts/sh/dlm8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/sh/dlm b/scripts/sh/dlm
new file mode 100755
index 0000000..1d9b28f
--- /dev/null
+++ b/scripts/sh/dlm
@@ -0,0 +1,8 @@
+#!/bin/sh
+# Download a Youtube song.
+# Flag: q - Do not print (as first param only)
+
+[ "$1" = "q" ] && flag="1>/dev/null" || flag=""
+[ "$1" = "q" ] && param="$2" || param="$1"
+
+yt-dlp -x "$param" -o "$HOME/songs/%(title)s.%(ext)s" $flag