A dynamic new books RSS feed

      4 Comments on A dynamic new books RSS feed

Working through my email today (trying to make a bit of space on the server), I happened upon a message from a listserv that I had skipped over a couple of months ago. Douglas Anderson (of the University of Alabama) was asking about RSS and the correct XML syntax to encode a canned URL to search a Voyager system by ISBN number. I got curious about what he might be up to and wrote a quick email asking if his question ever got answered. He quickly wrote back, letting me know that it wasn’t an issue any longer as the Unicode version of Voyager supported a BIB ID# search without a lot of fancy HTML coding.

He then pointed me to his Newbooks RSS feed.


Wow, I thought…what a great idea. I wrote again and he was nice enough to share a few thoughts with me. During that conversation (about things DBI, Voyager, Perl and so on) I realized that we were both satisfied users of Michael Doran’s newbooks software package for Voyager systems.

Not ready to try generating 300+ feeds like Douglas does down at Alabama, I decided to begin experimenting with trying to build an on-demand CGI generator for the information. Having just talked a bit about Michael Doran’s newbooks program, I realized he had already done much of the heavy lifting for this project (using a DBI interface to Oracle to pull the author, title, publication info, call number and shelving location for new books out of a Voyager system) had already been done. I was about to begin prying into the secrets of his code (Perl/DBI), when I noticed that the flat file his program generates (which I already run daily) could be used as the datasource for my CGI process…which made real-time generation much more feasible. I hacked together a short Perl process to query the newbooks.txt file and produce an RSS feed for a particular call number prefix. For my tests I went with QA.

Here’s a rough first cut…it creates an RSS feed and in each item there’s a link to our online catalog for more information on that title.


It looks nice in Safari (which offers in-browser sort options) and Opera’s built-in RSS reader works OK (where each item looks like an email message) but it looks kinda odd/pointless in Firefox.

Two hours into teaching myself XML, I’ve already learned that you need to convert “&” signs into & or XML parsers balk. I can’t imagine what I’m going to discover next…

There’s more to do on this project but I hope to develop a CGI that lets the user specify the call number range and receive an RSS feed in return. Then our subject reference librarians can just include the URL on their webpages…

If you’d like the bit of perl I used for this experiment, drop me a line. If you have a better way to do this, please let me know…

Update: Have now managed to hack out a little program that takes an argument and sends out 15 new books that begin with that call number stem. Here’s the example for TK titles: