How to make a MintCast Automatic Download

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

How to make a MintCast Automatic Download

Postby anjanaya on Sun Dec 28, 2008 2:56 pm

I've been using Mint for about an year now & there's no Question i love it.One one of my visits to the site i saw mintCast and was instantly attracted to it.
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


what it does is to get only the URL's of mp3 files on mintCast website and see if there is already one existing in the Download directory.
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
anjanaya
Level 1
Level 1
 
Posts: 6
Joined: Sun Jun 01, 2008 4:50 am

Linux Mint is funded by ads and donations.
 

Re: How to make a MintCast Automatic Download

Postby Husse on Sun Dec 28, 2008 4:28 pm

I've changed the subject line somewhat and moved it to the howto section
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden


Return to Tutorials

Who is online

Users browsing this forum: adfd1 and 6 guests