|
I will expand this and provide greater detail about these programs and about using Expect, but for now, here are some sample Expect files used to automate some III programs.. We use Expect as Perl module..
patron.pl > This program is used to automate patron loads. This program was written by Tom McNeely, our hardworking, talented guru, genius, and all-around great guy who started the Expect trend in the library.
books.pl > This program (also written by Tom) is used to automate the creation of new booklists. It runs the list and exports the data.
This is used with PERL scripts (New Materials List) which generate html pages.
weeklystats.pl > This program (again written by our local guru) extracts statistics every week from the system and emails them to me. This is particularly beneficial as the system only maintains 10 days worth of data.. this program ensures that data is never lost, and is gathered at precise intervals.
marcive.pl >This program is used to load MARCIVE records into our system. We get Shipping List records every Thursday, and the filename always reflects the date, so I used the initial part of the program to figure out the date, subtract one day ( I run it Friday to make sure it has time to get there), then load the records and email the results.
I use a shell script and with an embedded at command to run this weekly.
cascadeemail.pl > This program is used to generate a list of patrons who have an INN-Reach (Cascade) item checked out and who have email in their patron record. The program then uses the List Some of the Data option to send just name, ID #, and email address, which is printed to email and used to check against the print notices. Currently, the program automatically sends email notices, but not print notices. We browse the list and then only send print notices to the people who didn't get an email notice.
I use a shell script with an at command to run this daily.
inhouse.pl > This program is in process.. it will be used to process IN-house counts. We are not yet doing this, but plan to begin doing so. This program is actually used in conjunction with a WinBatch script on the windows side which helps the students load the data and ftp's the file over to a server.. This program then processes the file through the III system.
I plan to set up a cronjob to look for a file in this directory every minute. The program determines if a file is in the directory, and processes it if one exists.
ENJOY!
|