FooCat BarCode

HISTORY

My original foocat decoder did its work the wrong way -- with an enormous,
stupid lookup table. In the beginning, no one knew what the real code
was, but someone had figured out a simple lookup table that worked for
numbers. I determined to expand it to work for all barcodes. So, I
used GNU barcode to print out a full set of code128 barcodes, and
scanned them all in. I ran the data through a perl script that
correlated scan data to known barcode data, and had a monster table
that mostly worked.

As it turns out, I did it the hard way. Digital Convergence actually
uses a modified base64 encoding, XORed with 67. That's it. Thanks to
Jean-Philippe 'JP' Sugarbroad for figuring it out, and to Colin Cross
for making me aware of it. 

Aug 29, 2000:			"lookup" program provided by Kev Vance

Aug 30, 2000: 		Digital Convergence sent me a vague but threatening letter.
									http://www.flyingbuttmonkeys.com/useofthingsyouownisnowillegal
									I have sent them a polite letter asking, basically,
									"What the hell are you talking about?". Their letter was so vague
									that I don't know what to make of it, other than they're dyspeptic
									about something. The letter was not even addressed to me. It was
									addressed to my address, but not me personally, and there is no
									company "flyingbuttmonkeys.com" -- it's just a personal domain.
									I get my email there.
									But anyway, I've disabled lookups of cuecat scans on the Digital
									Convergence servers. It seems boneheaded of them not to want me
									to refer additional users to their servers, but I don't want to 
									upset them needlessly. Since I do not know if they would get
									pissed if I have my program use their servers, I will simply stick
									to decoding the scan data and looking up info on known public sites
									like Amazon, deBarcode, Barnes and Noble, etc. 
									Of course, I'll probably get another letter complaining that I do 
									not direct traffic to their site. Whatever.

Sept 03, 2000:		Decode now conditionally returns output lines. Type AMAZON is
									returned only if an ISBN number is scanned. Type CUE is returned
									only if one of those silly ":C" codes is scanned. Type DATA is
									always returned.
									Leonid A. Broukhis, leob@mailcom.com, provided a patch to decode
									cuecat scans (type "CC!"). Thanks!
									Changed libcue api slightly. Now returns struct bookinfo * for
									ISBN scans, and struct cueinfo * for cue scans.
									Everything else is in struct chunk *.
									Changed struct chunk * first field from "head" to "scaninfo"
									to provide the raw scan info. Be due to deallocate everything!
									libcue provides deallocmem(void *), which doesn't try to free
									NULL pointers. Might want to use it. Also, a struct bookinfo *
									can be freed in one fell swoop by using free_bookinfo(). Likewise,
									a struct cueinfo * can be freed by free_cueinfo(); Also, you can
									create new bookinfo and cueinfo structs by using new_bookinfo and
									new_cueinfo. They return the struct full of NULL pointers.
							

PROGRAMS
libfoocat.o:			library on which the rest of this depends.. read libfoocat.h

decode:        		command-line utility; returns tab-delimited decoded data
               		It will convert the first  argument and then quit. Or, it will 
               		go into a loop reading on STDIN and writing decoded output to 
               		STDOUT, if no arguments are supplied.
               		Output format is as follows:
               		TYPE <tab> DATA <tab><field><tab><field>[...]<\n>
               		Supported output fields are currently:
               		DATA<tab>serial#<tab>code type<tab>data<\n>
               		CUE<tab>formatted data<tab>cue-request-url<tab>cue-url<tab>cue-description<\n>
               		AMAZON<tab>ISBN<tab>url<tab>title<tab>author<tab>image-url<\n>
               		Written by: Michael Rothwell <rothwell@holly-springs.nc.us>
               
contrib/lookup: 	like decode, but also queries Amazon for book title.
               		Written by: Kev Vance <kvance@tekktonik.net>
               
foocat-applet: 		simple Gnome panel applet to perform lookups
               		It sits in the panel waiting for you to click on it. When you 
               		do, you get a text-entry box. After you scan the barcode, it 
               		will go back to being a label, but will display the barcode 
               		information. It will also display the ISBN number, if it is an 
               		ISBN barcode.
               		It also looks up Cues and makes Netscape go to the cue-url. 
               		There is no way to shut this off at the moment. Future versions 
               		will be a little more feature-complete.
               		Written by: Michael Rothwell

cuecat-gtk:    		Gtk+ application to process scans. Decodes ISBN, looks
               		up info on Digital Convergence servers. Can launch browser
               		to go to site indicated by DCNV, or query Amazon, etc.
               		"Coming soon"
               		Written by: Michael Rothwell


COMPILING
Just type "make". I wrote this on Linux. I don't know if it
works on other OSes. If you want to make the command-line
utility alone, type "make decode". If you want the Gnome
panel applet, type "make foocat-applet". Just typing "make"
will make everything, and will fail on machines without
Gnome installed. Foocat-applet uses the newer gnome (1.2)
panel functions, so it will fail on older gnome boxen. I
use Helix gnome, YMMV.

BUGS
Probably. Write me at rothwell@holly-springs.nc.us if you find any.

