Contact

admin

About Me · Send mail to the author(s) E-mail · Twitter

At GROSSWEBER we practice what we preach. We offer trainings for modern software technologies like Behavior Driven Development, Clean Code and Git. Our staff is fluent in a variety of languages, including English.

Feed Icon

Tags

Open Source Projects

Archives

Blogs of friends

Now playing [?]

Error retrieving information from external service.
Audioscrobbler/Last.fm

ClustrMap

E-Mail Notifications for the Juice Podcast Application

Posted in Tools and Software at Thursday, March 16, 2006 12:29 AM W. Europe Standard Time

Recently I found some podcasts (namely Hanselminutes and .NET Rocks!) that catched my attention. I like to listen to them on my mobile while driving to work, because instead of looking out of the window I could get some information on technology in an entertaining way.

Juice LogoAt first, I subscribed to the podcasts using my RSS reader. The process of catching up new shows was less than optimal because RSS Bandit is optimized for text feeds. So each time I had to open the show's web page and download the audio file. A dedicated podcast application would do a better job because it downloads RSS enclosures automatically. I decided to try Juice, a free podcatcher. Of course I installed iTunes, but it was not convincing as the memory consumption was also a bit too large for managing two subscriptions. Also I don't own an iPod and carrying another device around would be too painful.

Juice does a decent job of downloading shows to my hard drive and running silently as a background task. However, there are no built-in notifications to remind me when a new feed arrives. Luckily, Juice is able to run an application when new podcasts have been downloaded.

Juice Preferences

As you can see in the image, I've configured to run a little script that sends me an e-mail in the event of a finished download. The script uses Blat to send e-mails and looks pretty simple.

var blat = "<Path to Blat executable>\\blat.exe"
var smtpServer = "<Your SMTP server address>";
 
// Separate multiple recipients using ",".
var senderEmail = "<Sender>@<Your domain>";
var reportEmail = "<Recipient>@<Your domain>";
 
// Get parameters.
var feed = WScript.Arguments(0);
var file = WScript.Arguments(1);
 
// Build command.
var command = '"' + blat + '" -debug -try 5 -server ' + smtpServer + ' -f "' + senderEmail + '" -to "' + reportEmail + '" -subject "[Juice] New Feed Arrived for ' + feed + '" -body "File: ' + file + '"';
 
// Send mail.
var wshShell = new ActiveXObject("WScript.Shell");
wshShell.run(command, 0, false);

Save the script above as NewFeedArrived.js and edit the bold parts to match your SMTP configuration. Then adjust the Juice preferences as shown in the screen shot above. You can verify that the script is working using this command line:

wscript "<Path to NewFeedArrived.js>\NewFeedArrived.js" "Feed Name" "Feed File"

Sample E-Mail

There were some problems with Juice and Unicode paths and file names, but this was easy to resolve by creating a hard link to the download folder that does not contain Unicode characters. Yes, this is possible on Windows using the linkd command line utility (download, description) or, if you prefer graphical interfaces, NTFS Link.

Now playing: Space Night Vol. 3 - Aural Float meets The Arc in the Sky - Clash of the scales

All comments require the approval of the site owner before being displayed.
(will show your gravatar icon)
 
[Captcha]Enter the code shown (prevents robots):

Live Comment Preview