How to make a MintCast Automatic Download

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
anjanaya

How to make a MintCast Automatic Download

Post by anjanaya »

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
Husse

Re: How to make a MintCast Automatic Download

Post by Husse »

I've changed the subject line somewhat and moved it to the howto section
Post Reply

Return to “Tutorials”