summaryrefslogtreecommitdiff
path: root/.local/bin/web/ytf
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/web/ytf')
-rwxr-xr-x.local/bin/web/ytf10
1 files changed, 10 insertions, 0 deletions
diff --git a/.local/bin/web/ytf b/.local/bin/web/ytf
new file mode 100755
index 0000000..57b4af2
--- /dev/null
+++ b/.local/bin/web/ytf
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+case "$1" in
+ '') echo "ytf - download media using youtube config file\nUSAGE: ytf <FILE> [OPTION]..." >&2; exit 1 ;;
+ *.ytd) yt-dlp --config "$@" --config ~/.config/yt-dlp/videos.conf ;;
+ *.ytp) yt-dlp --config "$@" --config ~/.config/yt-dlp/playlist.conf ;;
+ *.ytps) yt-dlp --config "$@" --config ~/.config/yt-dlp/sequenced-playlist.conf ;;
+ *.ytc) yt-dlp --config "$@" --config ~/.config/yt-dlp/channel.conf ;;
+ *) echo "ytf: $1: config file not understood"; exit 1 ;;
+esac