B5Outlook

B5Outlook is a silly program which can keep your Outlook 98 calendar page up to date with all the Babylon 5 TV broadcast schedule information from the TNT B5 calendar web page. (Needless to say, this will do you no good if you aren't running on Windows 95, 98, or NT and using Microsoft Outlook 98).

This document and the B5Outlook program and source code are all Copyright © Tom Horsley, 1998. All rights reserved. The right to unlimited distribution and use of this program is granted to anyone who agrees to keep the copyright notice intact and not alter the program.

Translation: You want changes in the program, make 'em yourself, but don't go distributing that changed version with my name on it (or with your name on it either, since you didn't write most of it :-). If there are changes you would like to see distributed, by all means send 'em in to me, and if I like 'em I'll incorporate them in the next version.


Using B5Outlook

The normal mode of use will be to schedule a regular download of the TNT web page to your local computer using the web page subscription feature of internet explorer and then use the task scheduler to run the B5Outlook.exe program somewhat later than the subscription update. B5Outlook then reads the web page in offline mode, parses the html to extract the individual episode items, and updates the calendar in Outlook 98.

You can also optionally use B5Outlook in online mode to read the web page directly, but you have to be connected to the internet when you run it in online mode.

When B5Outlook runs, it searches for any previous calendar entries it generated and deletes the ones which no longer appear in the TNT web page (which means you will want to empty your "deleted items" folder from time to time). If some of these old entries were still scheduled for times in the future, it assumes there has been a schedule change at TNT, and includes these items in the (optional) report it generates to alert you to B5 schedule changes (see the Report and ShowReport options).

You can also use options to have Outlook play a sound when it reminds you of the broadcast (there are some good B5 sound clips on B5 web pages around the network - Kosh saying "You have forgotten something" is particularly appropriate :-), and you can pick how many minutes notice you want before the broadcast.

Options and Registry

The B5Outlook program accepts several command line options to control the way it works. Each option may also be given a default value by making registry entries under the key:

HKEY_CURRENT_USER\Software\ntcli\B5Outlook\1.1

If you specify a command line option when running the program, it will use that value. If there was no option given on the command line, it will use the value from the registry if it can find it. If there is no registry value, it will use the hard coded defaults built in to the program.

Option or Registry Value Description Default Value
Url The URL of the Babylon 5 TV schedule. http://tnt.turner.com/babylon5/calendar.html
Sound The name of the sound file to play as reminder. none
Online Fetch the web page from the internet, not the offline cache. false
Notice The number of minutes notice to give prior to each show's broadcast time. 3
Body The text to specify as the body of the reminder notice. This is an automagically generated B5 on TNT reminder.
Report The name of a file where an html format report of any schedule changes will be written. none
Prefix The html for the prefix of the report. <html>
<title>B5 Schedule Changes</title>
<body>
<h1><FONT color="#FF0000">B5 Schedule Changes</FONT></h1>
Suffix The html for the suffix of the report. </body>
</html>
ShowReport If we generate a schedule change report, then pop up a web browser to view it. true
Zone Number of minute to add to the schedule time to adjust for time zone differences (can be a negative number, usually will be a multiple of 60) 0
Custom Name of file holding individual episode customization information. none

The program is fairly flexible about the syntax for the command line. You can start the options with either a '-' or a '/' character, and the option value can be separated from the option name with either a ':', or a '=' character or simply be specified as the next argument. For example, all the following are equivalent:

-Report:c:\temp\b5report.html
/Report=c:\temp\b5report.html
-Report c:\temp\b5report.html

For options which are simply flag values (such as Online and ShowReport), you can turn the option on by simply specifying it on the command line and you can turn it off by prefixing it with the word "no". You can also specify a value of true or false or yes or no using the ':' or '=' syntax. Some examples:

-Online:false
-Online=true
/ShowReport
/NoShowReport

The program will also accept any case for the option names, it doesn't have to be given in the exact mix of upper and lower case shown in this chart.

The registry entries should be REG_SZ entries for things like file names and text strings, and REG_DWORD entries for integer values and flags. The flag values should be given as 0 (off) or 1 (on).

Customization

Maybe you don't want to be reminded of all the B5 episodes. Or maybe you want a different sound clip played for some of them. You can control individual episode information by telling B5Outlook where to find your customization database (don't panic, its just an ordinary text file you can create with any old text editor you happen to have handy).

The file format is similar to the good old windows .INI files. In this case a line containing an episode name enclosed in square brackets can be followed by any number of lines of the format keyword=value.

The possible keywords you can use are:

Keyword Description
remind The word "yes" means generate a reminder, "no" means do not generate reminder for this episode.
body Custom text for the body of the reminder.
duration The number of minutes this episode runs (defaults to 60, but you might want to name the movies and say they are 120).
notice Number of minutes notice to give for this episode.
location Location information to record in reminder.
sound Name of sound file to play for this episode (or just put nothing following the '=' to make this reminder have no sound).

For example, I have been recording all the shows, and sometimes the recording doesn't go too well. So I have a database set up to remind me of the shows I need to try recording when they come around again, but suppress the reminders for the shows I already recorded. A piece of that database looks like this:

[Grey 17 Is Missing]
remind=no

[And the Rock Cried Out, No Hiding Place]
remind=no

[Shadow Dancing]
remind=yes
body=missed start of episode

[Z'ha'dum]
remind=yes
body=credits cut at end

[Sleeping in Light]
remind=yes
body=New Episode!!!

[The River of Souls]
remind=yes
body=New B5 movie!!!
duration=120

Keywords may be specified in any mix of upper and lower case and will still be recognized. You can also be fairly sloppy with leading and trailing spaces, and B5Outlook should still be able to figure out what you meant. It can even deal with some small variations in the spelling and punctuation of the episode titles (so when the folks at TNT spell apotheosis as apothesis, it will still manage to match :-).

Download B5Outlook

B5Outlook.exe is the program itself (not a self unpacking executable or anything like that). It is self contained (as far as I know - if some DLLs are missing, you can probably search for them on Microsoft's web site).

B5Outlook.html is the file you are looking at. You might want to save this on your system for reference.

B5Outlook.zip is the Visual C++ 5.0 source code for this monster. If you really want to hack on it yourself, you'll probably also need to search Microsoft's web site for the outlook development kit and install it on your computer (and edit the -I option in the Makefile to point to where the type library file was installed).

Click here to get to my home page, where you can find various other goodies that might be of interest (such as tools to keep your computer's clock accurate so it will always remind you of B5 at the right time :-).

History

This program isn't entirely silly. Many of the bits and pieces are taken from a more elaborate system I'm working on for a home automation project (one of the things to automate is running the VCRs based on up to date schedule information from the internet, not to mention accurate time from the internet, so I can even record programs automatically on a VCR that is flashing 12:00 :-).

The first version of this program was released in late August of 1998. TNT then almost immediately updated their calendar page with a slightly different format for the dates which broke the first version (naturally).

The second release of B5Outlook followed a couple of days later.

This third (and probably final) release has added the Custom option, and helped me kill the labor day weekend (in between watching Sammy Sosa and Mark McGwire punish baseballs).

Deep Thoughts

Admittedly, this is kind of a silly program, but its all part of my insidious plot to lure people to my home page in search of fabulous free software. Once there, they will encounter my revolutionary political ideas and start pressing their congresscritters for reforms along the lines I describe.

Hey! Come to think of it Joe Straczynski is part of that nasty Hollywood elite that controls the US government on odd days (as we all know, either the Trilateral Commission or Queen Elizabeth controls it on even days). Hey Joe! Maybe you can get the government to adopt my ideas! :-).