Last active
November 27, 2015 01:18
-
-
Save d9k/0e20d20ea55a242c8e15 to your computer and use it in GitHub Desktop.
vkopt output mp3 shuffle download
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 | |
find tracks -size 0c -delete |
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 | |
function echoUsage(){ | |
echo "Usage: do-everything-together.sh [tracks-count]" | |
} | |
tracksCount=$1 | |
if [[ -z "${tracksCount}" ]]; then | |
tracksCount=120 | |
echoUsage | |
echo "tracks count would be ${tracksCount} by default" | |
fi | |
bash prepare-and-shuffle.sh ${tracksCount} && bash download-from-shuffled-wget.sh && bash delete-zero-length.sh && bash show-tracks-stats.sh |
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 | |
allWget=all-wget.txt | |
shuffledWget=shuffled-wget.txt | |
# TODO | |
function echoUsage(){ | |
echo "Usage: prepare-and-shuffle.sh [tracks-count]" | |
} | |
tracksCount=$1 | |
if [[ ! -f "${allWget}" ]]; then | |
echo "Use VkOpt for Chrome to obtain wget links and put it to \"${allWget}\". Run script from the same folder while staying in it" | |
exit | |
fi | |
if [[ -z "${tracksCount}" ]]; then | |
tracksCount=120 | |
echoUsage | |
echo "tracks count would be ${tracksCount} by default" | |
fi | |
sed "s/wget /wget --continue --tries=1 --timeout=10 /g" "${allWget}" > all-prepared-wget.txt | |
sort -R all-prepared-wget.txt | head -n ${tracksCount} > "${shuffledWget}" | |
ls -lh "${shuffledWget}" | |
head "${shuffledWget}" | |
echo ". . . . . . . . . ." |
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 | |
allWget=all-wget.txt | |
shuffledWget=shuffled-wget.txt | |
# TODO | |
function echoUsage(){ | |
echo "Usage: prepare-and-shuffle.sh [tracks-count]" | |
} | |
tracksCount=$1 | |
if [[ ! -f "${allWget}" ]]; then | |
echo "Use VkOpt for Chrome to obtain wget links and put it to \"${allWget}\". Run script from the same folder while staying in it" | |
exit | |
fi | |
if [[ -z "${tracksCount}" ]]; then | |
tracksCount=120 | |
echoUsage | |
echo "tracks count would be ${tracksCount} by default" | |
fi | |
sed "s/wget /wget --continue --tries=1 --timeout=10 /g" "${allWget}" > all-prepared-wget.txt | |
sort -R all-prepared-wget.txt | head -n ${tracksCount} > "${shuffledWget}" | |
ls -lh "${shuffledWget}" | |
head "${shuffledWget}" | |
echo ". . . . . . . . . ." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment