You are not logged in.

#1 2009-06-05 14:19:03

LeoSolaris
Member
From: South Carolina
Registered: 2008-03-30
Posts: 354

Help--> Use Amazon ISBN # search in a Go-OO DB front-end?

Here is the idea:

I am making a DB for my books with Go-OO. I found a neat how-to in Linux Pro Mag for a similar project aimed at article publications, and it was easily adapted to my library. I got it set up the way I want it, all the right fields, and I have a front-end for the DB. No problem. The macro that the Author wrote was easy to change to get the fields I wanted.

What I want to do though, is be able to type in the ISBN # and have it auto populate the rest of the fields first from within the DB, but if it is not found in the DB, from Amazon. The rest of the fields can just search the DB like normal, because of conflicting results. Generally an ISBN # search results in only one book on the list.

I do not really care what language it is in so long as it works predictably. I am still new to coding/scripting myself, and I know a little bit about python, perl, ruby, and just enough bash to get myself in trouble. With my limited knowledge of these languages, I am not sure how to link the activation of the code with something in the DB front end, (Maybe a web style "search" button to active the script?) or exactly how to parse the data into the proper fields while still maintain the ability to edit the fields if it should pull in the wrong book. (It does happen occasionally, but Amazon is more reliable than Google Books for an ISBN # look up.)

I am not looking for someone to write the whole thing for me, I just want a few pointers on how to do it myself. I am trying to learn programming on my own in general terms. I get the feeling this is able to be done in several different ways, but creating the trigger for the script, and causing a search of Amazon to get the required results to parse is outside of my knowledge base.

An ISBN search for 0-596-00281-5 returns this is the Amazon page's source code:

<div class="productImage"><a href="http://www.amazon.com/Learning-Python-Second-Mark-Lutz/dp/0596002815/ref=sr_1_1?ie=UTF8&qid=1244209481&sr=8-1"> <img onload="if (typeof uet =='function') { uet('af');uet('cf'); }" src="http://ecx.images-amazon.com/images/I/5120LkJsXxL._SL160_PIsitb-sticker-arrow-dp,TopRight,12,-18_SH30_OU01_AA115_.jpg" class="" border="0" alt="Product Details" width="115" height="115"/> </a></div>

<div class="productData">
  
  
  
  <div class="productTitle"><a href="http://www.amazon.com/Learning-Python-Second-Mark-Lutz/dp/0596002815/ref=sr_1_1?ie=UTF8&qid=1244209481&sr=8-1"> Learning Python, Second Edition</a> <span class="ptBrand">by Mark Lutz and David Ascher</span><span class="binding"> (<span class="format">Paperback</span> - Dec 2003)</span> - <span class="format">Illustrated</span></div>



<div class="newPrice"><a href="http://www.amazon.com/Learning-Python-Second-Mark-Lutz/dp/0596002815/ref=sr_1_1?ie=UTF8&qid=1244209481&sr=8-1">Buy new</a>: <strike>$39.99</strike> <span>$26.39</span></div>
<div class="usedPrice"><a href="http://www.amazon.com/gp/offer-listing/0596002815/ref=sr_1_olp_1?ie=UTF8&qid=1244209481&sr=8-1">41 Used & new</a> from <span>$1.06</span></div>
<div class="fastTrack">Not in stock; order now and we'll deliver when available</div>

All I need out of it is the name, author(s), and it's binding type.

In this case: Learning Python, Second Edition | Mark Lutz and David Ascher | Paperback 

These will go into three separate fields in the DB form, and I can manually add to that form how good I thought the book was, how many copies I have, and their condition(s). Picking out the image of the book would be a nice bonus, but I would have to re-organize the DB and figure out some what of displaying it when I searched for it.

*******

By the way, if anyone has a better suggestion for a DB than OpenOffice's Base and an easier way to manage the front end than this, please let me know. I think it may be able to be done as a locally available Apache webpage with MySQL backing it, but I have not even tried that approach. I really do not want to put this on the web, just make it available to me and the wife on our local server.


I keep getting distracted from my webserver project...

huh? oooh...  shiny!

Offline

Board footer

Powered by FluxBB