Book Club, Z39.50, Yaz and Sudo

As mentioned in Book Club Modifications – IV, Book Addition Mechanism is being simplified. SVTechie Book Club right now can read book data from Amazon based on ISBN number so that user does not have to type in whole information. It uses SOAP interface to achieve this.

But I wanted to add search/fetch capabilities to Library of Congress catalog as it has much bigger collection. Now, I stumbled on something called Z39.50. This information is from Z39.50 Gateway.

Z39.50 is a national and international (ISO 23950) standard defining a protocol for computer-to-computer information retrieval. Z39.50 makes it possible for a user in one system to search and retrieve information from other computer systems (that have also implemented Z39.50) without knowing the search syntax that is used by those other systems. Z39.50 was originally approved by the National Information Standards Organization (NISO) in 1988.

Great, only thing I need is Z39.50 client which can work with PHP. And YAZ is the great thing to achieve this. Information is available at Index Data PHP YAZ page. And letest version canbe downloaded from PECL.

I checked if Dreamhost provided PHP already has Yaz extension support and it does not! So ofcourse, I need to compile my own PHP and BTW, Dreamhost has nice support script to achieve this. I would like to provide it here but I am not sure if I can do that. link is here http://wiki.dreamhost.com/index.php/Installing_PHP4

Ofcourse, it did not work right away as other linux/unix scripts. First, I needed to add YAZ support into this. Another was libxml2 gave "xml.sax" related warning and script aborted (though there was no need to abort the script). So I built Yaz and libxml2 manually. Rest of the stuff was okay. I tried example fetch script from YAZ page and it worked Smile

Oh, there is one more thing.. I tried to use sudo as mentioned on YAZ as I did not know anything about sudo.

Sudo (superuser do) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while logging the commands and arguments.

Ofcourse, sudo did not work and it could be dangerous too! Actually I need not to use sudo at all because I was installing in my home directory. Neverthless, my attempted sudo access is logged in to dreamhost system logs Smile

Stay tuned for book club modifications! 

Leave a Reply

Your email address will not be published. Required fields are marked *