2 # scan_stuff scans papers
3 # and is released under the terms of the GNU GPL version 3, or any
4 # later version, at your option. See the file README and COPYING for
6 # Copyright 2014 by Don Armstrong <don@donarmstrong.com>.
17 scan_stuff - scans papers
24 --debug, -d debugging level (Default 0)
25 --help, -h display this help
26 --man, -m display manual
34 Debug verbosity. (Default 0)
38 Display brief usage information.
55 my %options = (device => 'fujitsu',
62 'debug|d+','help|h|?','man|m');
64 pod2usage() if $options{help};
65 pod2usage({verbose=>2}) if $options{man};
67 $DEBUG = $options{debug};
71 # push @USAGE_ERRORS,"You must pass something";
74 pod2usage(join("\n",@USAGE_ERRORS)) if @USAGE_ERRORS;
84 find(sub { return if /^\./;
85 $File::Find::prune = 1 if -d $_;
87 $last_num = $1 if $1 > $last_num;
94 exec('scanimage','-d',$options{device},
95 '--source','ADF Duplex','--mode','Gray','--format','tiff',
96 '--batch=out_'.sprintf('%03d',$last_num).'_%03d.tif');