Sha256: cbaa8d112c850fd04ea2f936fa62563abb251715a3ddb558d3f977c01dabb1d3
Contents?: true
Size: 752 Bytes
Versions: 16
Compression:
Stored size: 752 Bytes
Contents
# Given an image, return an ordered array of detectable barcodes # # !! DOES NOTHING !! # class Sqed::Parser::BarcodeParser < Sqed::Parser TYPE = :barcode attr_accessor :barcode def initialize(image) super @image = image end def barcode @barcode ||= get_barcode @barcode end # Uses the same engine as zbarimg that you can install with brew (zbarimg) # def get_code_128 nil # ZXing.decode @image.filename end # try a bunch of options, organized by most common, give the first hit def get_barcode [get_code_128].compact.first end #def get_datamatrix # https://github.com/srijan/ruby-dmtx #end # alias to a universal method def get_text(section_type: :default) barcode end end
Version data entries
16 entries across 16 versions & 1 rubygems