Resources/Library/Dead Tree/Scanner

From Noisebridge
Jump to navigation Jump to search

Problem: Noisebridge has a lot of dead tree books. We don't have a definitive list

Solution: Scanning the UPC barcodes on each of the books and creating a catalog

Hardware[edit]

I've purchased an Inateck 2.4GHz USB barcode scanner which presents itself as a regular HID to the kernel.

The scanner operates as a normal keyboard when connected over the 2.4GHz USB connection. While the scanner is out of range of the USB receiver you may continue scanning, as it has an internal memory capable of storing 2600 barcodes. When the scanner is reconnected next after this it'll write out each of the codes in rapid succession.

Software[edit]

I've written a small Rust program to read the key events from the scanner using libevdev, a library for interacting with input devices in userspace.

The source code can be found on Github. As of time of writing the code outputs the UPC codes to STDOUT as it receives them, but I'm working on instead writing out ISBN codes.

Setup[edit]

The intended setup is to have this running as a daemon on Pegasus where it'll log each new barcode to a file. Another daemon (yet to be written / sourced) will read new lines of this file and search for the ISBN, then adding them to whatever catalog software we choose.