Book scanner

I signed up for an Amazon Web Services API key and wrote a script to read from the current version of my book barcode scanner station. The barcode scanner reads a UPC and sends it to the STAMP. Code running on the STAMP determines if the code is an “bookland” UPC that has the ISBN number encoded in it or some other code that it doesn’t recognize. If it’s an ISBN, the STAMP calculates the check digit, lights the red LED, displays the ISBN on the LCD, and sends a command to the PC like this “ISBN 0123456789”. If it’s not an ISBN, the red LED is off, the LCD displays ‘DATA whatever it read’ and no command is sent to the PC.

On the PC, the python script reads commands from the contraption. When it gets a command to do an ISBN lookup, it queries AWS and displays what it found. If it found the book it writes the title, author, and some other fields into a tab seperated file. Either way it displays some text so I know if a book goes into the ‘manual entry’ pile or the ‘inventoried’ pile.

Many books today have the EAN barcode which has the ISBN in it. Most mass market paperbacks also have a UPC code that can be converted to an ISBN if you can read the supplemental data and have a lookup table mapping the manufacturer code in the UPC to a ISBN prefix. My barcode scanner can’t read the supplemental data, so I can currently only scan books that have the EAN code.

I had a version of this that would display the results of the lookup on the LCD, but waiting on the amazon lookup to scan slowed my process down too much. By not waiting for the amazon lookup to finish I can keep scanning and look up to see the progress on the pending scans.

So far I’ve inventoried 180 books. I’ve seen 28 books that weren’t on amazon or didn’t have a barcode ISBN that I could read. I’ve been piling these up to deal with later. There’ll be some further massaging of the data necessary once I have everything scanned, since amazon returns the author as “first m. last” and I eventually want them as seperate fields so I can sort and group. Some authors are IN ALL CAPS, too.

All of the hardcovers that had any bar code had the EAN code. Most of the paperbacks had the EAN code. Only one book that had an EAN code was not listed on Amazon. Most of the books that I haven’t been able to scan had no bar code at all. One had no ISBN that I could find.

So what now? My plan is to keep scanning with the station as-is while I decide which scanner to buy.

I’ll probably pick up a new barcode scanner that can read supplemental data and simplify the set up by eliminating the STAMP-based scanner station and making the python script a bit smarter. Using the STAMP and LCD for this is neat (and the most convenient way to use the surplus scanner I have) but I think this application would work better without the STAMP involved. With a USB barcode scanner I could hook it to the tablet PC and easily scan books closer to where they live. It’ll also read extended codes and expand the range of books I don’t have to enter by hand.

I have a couple ideas for what to do with the STAMP and perhaps the surplus scanner once they’re liberated from this application.