A small daemon to log input device events to a file.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
.travis.yml
Cargo.lock
Cargo.toml
LICENSE
README.md

README.md

barcode-rust Build Status

Tiny binary to read scancodes from a Inateck BCST-20 barcode scanner which I intend to use to catalogue the book collection at Noisebridge

This project is mostly an experiment with rust and c libraries

What

scanner is a small utility that can be used with a USB barcode scanner to help the process of cataloging books at Noisebridge. It specifically addresses two issues with using USB barcode scanners for this purpose

  • The USB scanners emulate keyboards and so write out to STDIN. For systems with multiple input devices this is cumbersome
  • We only want the consumer of this program's output to deal with valid ISBN codes to ingest them into the catalogue.

scanner uses libevdev, a wrapper around evdevices in Linux to "claim" the input device created by the USB scanner such that its input events aren't consumable by other programs accepting input from stdin at the same time. It filters its input for valid ISBNv13 barcodes, which it then writes to stdout.