About bookinfo.cgi

Why does bookinfo.cgi exist?

I felt like entering the information about the books that I have read, but I didn't feel like typing all the information in. I decided that I would enter the ISBN of each book and look for a way to retrieve the information associated with it.

How did I do it?

Well, one of the things I've learned over the years is how to use the various tools of unix systems to process text. I first wrote a script that would go through each ISBN number and retrieve the information from Borders.com's web site and put it into a semi-colon delimited file. Then I wrote a couple more scripts to put the file into a format that can be sorted and process the output into a html table. When I was writing the code to sort the table I realized that I could turn it into a cgi that would allow the user to sort the information how they wanted it instead of how I presented it.

What's up with the N/A's?

There are some edition of books that Boarders doesn't have in their database (such as Tom Clancy's Hunt for Red October). So I decided just to put N/A instead of completely eliminating them. I plan on working a way that I can query different sources so that I can eliminate all the N/A's that I currently have.

How does the query string behave?

The two parts of the query string are seperated by a semi-colon. The first part is the name of the list. There is a special name all that combines all the different book lists into one before processing. The second part is a comma delimated list of columns to sort by. The first is the primary key, and if there is two of the same, then the next until there are no more keys left to sort by. This allows you do sort primarly by Author, then Publication Date and finally by Title. The query string to sort all books like that would look like all;2,7,1.



email gurney_j@resnet.uoregon.edu
Copyright © 1999-2002 by John-Mark Gurney.
All Rights Reserved.