Created
July 21, 2018 02:57
-
-
Save thomastay/d7c5e5dae21c8b7cc7c03ff3224c38ac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#set -x | |
DATE=`date +%Y-%m-%d` | |
echo "Log from $DATE" > out.log | |
ENTRIES=8 #TODO: Please change me! | |
#Arrays are separated by spaces! | |
ARRAY=( | |
https://www.youtube.com/playlist?list=PLqKSWM3wXgnrMlice2vo63ZqzqG0LOghw | |
'Smooth-Standard\Foxtrot' | |
https://www.youtube.com/playlist?list=PLqKSWM3wXgno4yzVCGSu1gWLdGCZraGdW | |
'Smooth-Standard\Tango' | |
https://www.youtube.com/playlist?list=PLqKSWM3wXgnps9KZO64cg6RfDLtBYKW8X | |
'Smooth-Standard\Quickstep' | |
https://www.youtube.com/playlist?list=PLqKSWM3wXgnoOHYou6IHAlogCwj1H7E7a | |
'Latin-Rhythm\Samba' | |
https://www.youtube.com/playlist?list=PLqKSWM3wXgnpwVXI2FwqlL8mXYaQFbV5T | |
'Latin-Rhythm\Cha Cha' | |
https://www.youtube.com/playlist?list=PLqKSWM3wXgnpvDpfZO_V0RxQv7-g73gMN | |
'Latin-Rhythm\Intl. Rumba' | |
https://www.youtube.com/playlist?list=PLqKSWM3wXgnp5mg60CPV7JgejTZkEdzVH | |
'Latin-Rhythm\American Rumba' | |
https://www.youtube.com/playlist?list=PLqKSWM3wXgnpXW_meAh4izlVXEUZSKlCt | |
'Latin-Rhythm\Swing' | |
) | |
for i in $(seq 0 $(expr $ENTRIES - 1)); do | |
URL=${ARRAY[$(expr 2 \* $i)]} | |
FOLDER=${ARRAY[$(expr 2 \* $i + 1)]} | |
echo "Looking at playlist for $FOLDER" | |
youtube-dl $URL -o "~/Music/A2BallroomMusic/$FOLDER/%(title)s.%(ext)s" -x --audio-format mp3 -i --download-archive downloaded.txt -c | tee -a out.log | grep -U 'Destination' | |
done | |
URL=https://www.youtube.com/playlist?list=PLqKSWM3wXgnqEPbbP0odfT-vqutfc--EA | |
FOLDER='Latin-Rhythm\Hustle' | |
echo "Looking at Hustle music" | tee -a out.log | |
youtube-dl $URL -o "~/Music/A2BallroomMusic/$FOLDER/%(title)s.%(ext)s" -x --audio-format mp3 -i --download-archive hustle-downloaded.txt -c | tee -a out.log | grep -U 'Destination' | |
cat -v out.log | grep ffmpeg >> out-filtered.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment