Warning The programs on this web page are no longer maintained and largely rendered unnecessary. In 2004(?), I handed a printout of this page to Houston Public Library, Jungman branch, and expressed my wish that they provide book-due notifications to users. Not long after that, the service became available, and their notification email uses almost identical wording as in my programs.

HPL and HCPL

My family often checks out a dozen books and videos from Houston Public Library, mostly for the kids. We always had to remember the due date. But still we paid fines once in a while, until I wrote the HPL program.

The two Perl scripts, HPL and HCPL, check whether you have any books due soon at Houston and Harris County Public Library, respectively. If so, you get an email notification. They are run on command line. It's better to set up a periodic job on a computer you have control over so you don't run it manually everyday.

Prerequisite software is needed prior to installing this program.

1. if you use UNIX

2. if you use Windows

To install HPL or HCPL, depending on which library you check out books from, download hpl.pl or hcpl.pl, and save to a file with filename extension pl, i.e. hpl.pl or hcpl.pl. Hpl.pl contains some common notes that are important in troubleshooting.

To schedule an AT job on Windows, follow this instruction. If you have trouble with the AT job (often times due to user credential control), schedule a job with Control Panel | Scheduled Tasks applet instead. Since the program connects to the library Web site to check book status, your computer has to be online when the program runs. The best computer to set up this program on is your office PC and the best time to run it may be lunch time to guarantee both Internet connectivity and low interference with your work (it actually only takes about 20 seconds to run). If you're a UNIX user, I assume you know how to schedule a cron job.

Proxy server is a computer that sits between you and the Internet. If you don't know whether you're behind one, ask your system administrator. Or if you use Internet Explorer, go to Tools | Internet Options | Connections | LAN Settings. If your company requires username/password to connect to the proxy, set the values for $proxyuser and $proxypasswd in the source code hpl.pl or hcpl.pl.

Mail server name is needed for the program to run. To find the name of your mail server, check your mail client. Suppose you use Microsoft Outlook. Depending on the version, you may find it in Tools | Services, or Tools | Options | Mail Setup | E-mail Accounts | View or change existing e-mail accounts | highlight the exchange server name and click Change. Or find the server by running nslookup at DOS prompt. At the > prompt, type set type=mx, then yourdomain.com. (preferably with the last dot) and look at those called mail exchangers. If your company has no mail server and you use a free email account such as YahooMail or Hotmail (ever noticed many small businesses list their email contact at a yahoo.com address even though they have their own domain?), then you either have to limit your book check notification to either Yahoo or Hotmail account recipients but not mixed, or are completely out of luck. Having said that, you could give a fake mail server name and run the program just to capture the output of the book status with an error about sending emails.

If you still have mail problems, test sending an email by telneting to the mail server port 25. Assume the server is named mail (most companies use this name or smtp), your username (usually your Windows Logon ID) is johndoe and your email is jdoe@abc.com,
telnet mail 25
helo johndoe
mail from: jdoe@abc.com
rcpt to: jdoe@abc.com
data
This is a test.
.
Make sure you type everything including the last dot carefully without using backspace. If you make a mistake, type quit and start over. The recipient address after rcpt to can't be fake. You can test with your other email address. But it's possible your server doesn't relay for some of them.

Extending the use of these programs should be easy, if your local library happens to be using the same code on the Web server. Kevin Homer's New Castle County Library book check program is an excellent example.



To my Computer Page