Skip to content

Instantly share code, notes, and snippets.

@willjasen
Last active December 5, 2023 04:04
Show Gist options
  • Save willjasen/ac4e00a0e67c191e5f608c53caebebe6 to your computer and use it in GitHub Desktop.
Save willjasen/ac4e00a0e67c191e5f608c53caebebe6 to your computer and use it in GitHub Desktop.
download binrev radio mp3's
#!/bin/bash
# Binary Revolution Radio - The Revolution will be Digitized
# content also available on IPFS: QmfZqvTBdQJLEefgTVF2vY6Zfi5tGv5ePHkGBhUPiFwT8S
linkroot="http://audio.textfiles.com/shows/binrev/" # available via audio.textfiles.com
rootname="binrev" # every file starts with this name
filetype=".mp3" # every file is an MP3
for i in {0..186} # for each of the 187 episodes
do
number=$(printf '%03i\n' $i) # convert each number to a 3 digit number (leading zeros if needed)
filename="${rootname}""${number}" # each file name to construct
if [ $i = 0 ]
then
filename="${filename}"_pilot # if episode 0, then correct the filename generated
fi
filename="${filename}""${filetype}"
echo "downloading ${filename}"...
curl --progress-bar -o "${filename}" "${linkroot}""${filename}" # download the episode
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment