summaryrefslogtreecommitdiffstats
path: root/bin/yout2ogg
diff options
context:
space:
mode:
Diffstat (limited to 'bin/yout2ogg')
-rwxr-xr-xbin/yout2ogg24
1 files changed, 0 insertions, 24 deletions
diff --git a/bin/yout2ogg b/bin/yout2ogg
deleted file mode 100755
index b316099..0000000
--- a/bin/yout2ogg
+++ /dev/null
@@ -1,24 +0,0 @@
-#! /bin/sh
-set -euf
-target_folder=${target-./}
-
-uri=$1
-id=$(echo "$uri" | sed -n 's@^https\?://www\.youtube\.com/watch?v=@@p' | sed 's/#.*$//')
-script=$(readlink -f "$0")
-basedir=$(dirname $script)
-
-mkdir -p $target_folder
-
-if ! echo "$id" | grep -q .; then
- echo "bad uri: $uri" >&2
- exit 23
-fi
-
-cd $target_folder
-
-if file=$(ls | grep "[-]$id\\.ogg\$"); then
- echo "already done: $file in $target_folder" >&2
- exit
-fi
-
-youtube-dl -i -o "%(title)s-%(id)s.%(ext)s" --restrict-filenames -x "$uri" --add-metadata --exec "$basedir/ogg-maker {}"