zbarnet

command module
v1.0.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2015 License: MIT Imports: 3 Imported by: 0

README

# zbarnet Wrapper over zbarcam (httpclient)

Build Status

Welcome to ZBarNet, a wrapper over zbarcam (ZBar bar code reader)

Features:

  • Analysis of the bar code from the output zbarcode
  • The output to the console in the format: "raw", "json"
  • Sending barcode protocol http get or post methods
  • A single execution and closing zbarcam
  • Work as a service / daemon or cli

Menu:

Installation

  1. Install ZBar
  2. $ go get github.com/arteev/zbarnet

Quick start

Configure $HOME/".zbarnet.json"

The file can be located in the same directory with the program or in your home folder.


{
        "source": "zbar",
        "output": "json",
        "once": false,
        "zbar": {
                "enabled": true,
                "location": "/usr/bin/zbarcam",         
                "device": "/dev/video0",
                "args": [
                  "-q",
                  "--xml"
                ]
        },
        "http": {
          "enabled": true,
          "url": "http://httpbin.org/post?barcode=${barCode}&type=${barCodeType}&quality=${quality}&api=${apikey}",
          "method": "POST",
          "apikey": "THIS_IS_API_KEY",
          "apikeyhdr": true
        }
}

$ zbarcam

Output:

Hit Ctrl+C to [EXIT]
{
"type": "QR-Code",
"quality": 1,
"data": "d3d3LmRlZmVuZGVyLnJ1L2NvbnRlbnQvcXIvP2FydD02MzExMA=="
}

Service/daemon

  1. Configure $GOPATH/bin/.zbarnet.conf
  2. $ sudo $GOPATH/bin/zbarnet service install
  3. $ sudo $GOPATH/bin/zbarnet service start

Also see usage: $ $GOPATH/bin/zbarnet service -h

Configure

TODO

License

MIT

Author

Arteev Aleksey

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
actions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL