SANE bindings
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Denis Knauf a6499b3390 version bump to 0.1.3 9 years ago
lib version bump to 0.1.3 9 years ago
.gitignore initial import 12 years ago
Gemfile initial import 12 years ago
README.rdoc added simple readme 12 years ago
Rakefile initial import 12 years ago
sane-ffi.gemspec description constraints 9 years ago

README.rdoc

= SANE FFI

Scanner Access Now Easier in Ruby using FFI. This gem provides
bindings to SANE library using Ruby FFI. You can easily access to the
device state (i.e. buttons), setup device parameters, scan images,
etc.

== Usage

  >> require "sane"
  => true
  >> Sane.open { |sane| puts sane.devices.inspect }
  [#<Sane::Device:"genesys:libusb:002:032">]
  => nil
  >> Sane.open { |sane| puts sane.devices.first.name }
  genesys:libusb:002:032
  => nil
  >> Sane.open { |sane| puts sane.devices.first.vendor }
  Canon
  => nil
  >> Sane.open { |sane| puts sane.devices.first.model }
  LiDE 100
  => nil
  >> Sane.open { |sane| puts sane.devices.first.type }
  flatbed scanner
  => nil
  >> Sane.open { |sane| sane.devices.first.open { |device| puts device.describe(:copy) } }
  {:name=>"copy", :title=>"Copy button", :desc=>"Copy button", :type=>:bool, :unit=>:none, :size=>4, :cap=>70}
  => nil
  >> Sane.open { |sane| sane.devices.first.open { |device| puts device[:copy] } }
  false
  => nil

== Copyright

Copyright (c) 2011 Jakub Kuźma