remove youtuve-archive.sh
authorAndrew Lorimer <andrew@lorimer.id.au>
Sat, 7 Jul 2018 10:09:08 +0000 (20:09 +1000)
committerAndrew Lorimer <andrew@lorimer.id.au>
Sat, 7 Jul 2018 10:09:08 +0000 (20:09 +1000)
youtube-archive.sh [deleted file]
diff --git a/youtube-archive.sh b/youtube-archive.sh
deleted file mode 100644 (file)
index 7d6d3ba..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-
-YOUTUBEDL='/usr/local/bin/youtube-dl'  # Absolute path to youtube-dl executable
-ARCHIVE='~/youtube_archive'            # Absolute path to archive
-
-$YOUTUBEDL -U
-
-archive () {
-       mkdir -p "$ARCHIVE/$1"
-       cd "$ARCHIVE/$1"
-       rmdir -- * 2> /dev/null
-       rm -fv -- */*.part 2> /dev/null
-       rm -rf $(find . -printf '%h\n' | sort | uniq -c | while read -r n d ; do [ $n -lt 5 ] && printf '%s\n' "$d" ; done) 2> /dev/null
-       
-       $YOUTUBEDL -q --get-id https://youtube.com/$2 | while read VIDEOID; do
-               if [ -d "$ARCHIVE/$1/$VIDEOID" ]; then
-                       echo -e "\\n\\n$VIDEOID already archived, skipping…\\n\\n"
-               else
-                       echo -r "\\n\\nArchiving $VIDEOID.\\n\\n"
-                       mkdir "$ARCHIVE/$1/$VIDEOID"
-                       cd "$ARCHIVE/$1/$VIDEOID"
-                       $YOUTUBEDL -o "%(upload_date)s.video" -- $VIDEOID
-                       ls *.video | cut -c1-8 > date.txt
-                       mv -v *.video video.mp4
-                       $YOUTUBEDL --get-title -- $VIDEOID > title.txt
-                       $YOUTUBEDL --get-description -- $VIDEOID > description.txt
-                       wget $($YOUTUBEDL --get-thumbnail -- $VIDEOID)
-                       mv -v *.jpg thumbnail.jpg
-               fi
-       done
-}
-
-# Enter channels here. For example:
-#
-# archive "Gronkh"     Gronkh
-# archive "SpiegelTV"  channel/UC1w6pNGiiLdZgyNpXUnA4Zw