After downloading i very much liked the Style/Genuineness or something about it that hooked me to it.Ever since i visit the http://mintcast.org/ website to find the next mintCast.
Also while going through Linux Journal i saw the article about getting movie trivia from IMDB using a shell script.This got me thinking, Hmm. As i have download limit and free download only from 2 AM to 8 AM i thought why not download mintCasts using a shell Script?
Here's what i have put in cron to run at night.
getMintCast.sh
Code: Select all
#!/bin/bash
dnList=/tmp/$$.list #location of mintCast URL's
trap "rm -f $dnList" EXIT
mintCastSite='http://mintcast.org/'; # mintCast website
# Location of mintcasts already downloaded.
[ -d "${HOME}/Data/Downloads/mintCasts" ] && mintCastDownloadDir="${HOME}/Data/Downloads/mintCasts" || {
printf "\n\n\tmintCast Download Directory not found. Exiting...";
exit 65
}
#get mintCast URLs
printf "\n\n\tAvailble MintCasts on $mintCastSite are\n";
curl -s http://mintcast.org/ | sed 's/</\
</g' | sed 's/>/\
/g' | grep "href\=http\:\/\/.*mintCast[0-9][0-9][0-9].*\.mp3" | cut -d= -f2 | tee $dnList
cd $mintCastDownloadDir/
wget -c -i $dnList
printf "\n\n\tThese are the mintCasts available/Downloaded with Latest file at the bottom.\n"
ls -ltrh $mintCastDownloadDir/mintCast*.mp3
exit 0
if it exists then wget tries to continue & if it's already completed then leaves it as it is.
Just wanted to share the script for inputs.
Thanks
Anjanaya