DBDaemon/lib/scanner.rb
############## DRB Commands - Called from remote to list scann devices *********************************
DRB Commands - Called from remote to list scann devices
DRB Commands - Called from remote to list scann devices
def scanner_list_devices
    puts "**List Devices**"
    device_list=Hash.new
    device_string=%x[scanimage -f"%v %m|%d|"].split('|')
    0.step(device_string.count-1, 2) { |i| device_list[device_string[i]]=device_string[i+1]; puts "Device: #{device_string[i]}" }
    return device_list
  end
def scanner_list_devices puts "**List Devices**" device_list = Hash . new device_string = %x[ scanimage -f"%v %m|%d|" ] . split ( '|' ) 0 . step ( device_string . count - 1 , 2 ) { | i | device_list [ device_string [ i ] ] = device_string [ i + 1 ] ; puts "Device: #{device_string[i]}" } return device_list end
DRB Commands - Called from remote to list scann devices
DRB Commands - Called from remote to list scann devices
# ["Canon LiDE 35/40/50", "genesys:libusb:001:004", "FUJITSU ScanSnap S300", "epjitsu:libusb:002:005"]