Creating an RSS feed of the books you have checked out of the library
I am always forgetting when my library books are due. The PEI Provincial Library sends out handy email reminders, and they have a website that lists checked out items, but I need more (and more obvious) prodding.
The result is opac2rss.pl, a Perl script that automatically connects to the web-based Dynix (aka Epixtech) OPAC and grabs a list of the items I’ve got checked out and the date they are due. It then creates an RSS feed that I can read in my newsreader every morning.
The result looks like this:
The Alibi project in Nova Scotia was invaluable in getting this working, and the O’Reilly book Spidering Hacks was useful in understanding how to use the Perl HTML::TreeBuilder module.
Sunday, August 29, 2004 - 3:51pm

Comments
” . “Due back on: < b>” . $due . “” ); } ###–––––––––––––––––––— ### Output to STDOUT for browser who called me. ###–––––––––––––––––––— print “Content-type: text/xml\n\n”; print $rss→as_string; ## when in debug mode dump some stuff to a LOGFILE if ($DEBUG) { printf(LOGFILE “Content-type: text/xml\n\n”); if ($DEBUG>1){ printf(LOGFILE “\n”); printf(LOGFILE $rss→as_string); printf(LOGFILE “\n”); } printf(LOGFILE “** end request **\n”); printf(LOGFILE “\n”); printf(LOGFILE “\n”); close(LOGFILE); }