33 Commits

Author SHA1 Message Date
Raman Gupta
9ed52ab2fa More arithmetic context improvements, corner cases
* Handle truncate pages greater than or equal to the number of
scans.
2021-08-06 17:45:40 -04:00
Raman Gupta
d716cdbe8c Fix the multi-output loop
Resolves #33.

Fixes the arithmetic comparison in the while loop being
incorrect.

Also, handles the situation in which there are more output
files being specified than scans available, in addition
to the already handled reverse situation.
2021-08-06 12:51:29 -04:00
Raman Gupta
45cf51f9e8 Skip empty page detection if optional bc not available 2021-07-30 12:48:20 -04:00
Raman Gupta
c25dcdb8a5
Merge pull request #27 from p/no-shift
Remove erroneous shift call
2021-07-27 21:43:20 -04:00
Oleg Pudeyev
257c740095 Remove erroneous shift call 2021-07-27 20:38:44 -04:00
Oleg Pudeyev
cfce23c271 Quote the --mode argument for printers like Brother DCP-7065DN which use spaces in mode names 2021-07-27 20:38:34 -04:00
Oleg Pudeyev
c26d0b1bf7 Add the warning when neither -m/--mode nor --mode-hw-default are specified
As discussed in #22
2021-07-27 10:56:17 -04:00
Oleg Pudeyev
9ef32aef3f add --mode-hw-default option 2021-07-27 10:47:28 -04:00
Oleg Pudeyev
e3cbf1bcbb Omit --mode argument when its value is the empty string 2021-07-27 10:09:07 -04:00
Oleg Pudeyev
d7484becbc Quote the device argument.
Without doing so if the device includes a semicolon the following happens:

    % ./scan -x 'brother4:bus7;dev1'
    Scanning...
    scanadf: open of device brother4:bus7 failed: Invalid argument
    ./scan: line 248: dev1: command not found
    Found no scans.
2021-07-26 20:30:17 -04:00
Raman Gupta
b59999717e Allow disable default page size 2020-11-02 15:21:49 -05:00
Raman Gupta
6b313943bb Use bash built-in tests, additional arg parsing checks 2020-07-30 13:53:17 -04:00
Raman Gupta
f1baab604b Fix tmp directory cleanup with verbose
Can't set multiple traps on the same signal -- ensure that when the
verbose option is set, the regular cleanup is done in addition to the
lockfile cleanup.
2020-07-29 22:01:30 -04:00
Raman Gupta
30a7be1fd8 Merge branch 'issue-9' into master 2020-07-29 17:17:50 -04:00
Raman Gupta
59abdeafe0 Driver-based crop fixes
* Allow page size and crop to be set
* Add driver-based paper lower edge detection with crop
* Add overscan on page size to allow for cropping larger pages
* Do not default size to Letter if crop is specified
2020-07-29 17:17:22 -04:00
Raman Gupta
3582408e85 Minor stylistic changes 2020-07-29 17:11:40 -04:00
Raman Gupta
d17e23ed44 Support driver option pass-through 2020-07-19 08:18:56 -04:00
Raman Gupta
3c091969d5 Force output file spec 2020-07-15 01:12:34 -04:00
Raman Gupta
9143a41236 usage: note about truncate after skip empty 2020-04-01 01:38:51 -04:00
Artjom Simon
2e17cdad0f Parse argument for --language 2019-05-27 01:47:51 +02:00
Raman Gupta
38d59d4e6b Turn off deskew by default 2019-05-16 12:37:14 -04:00
Raman Gupta
0597cc4f98 Change default to driver deskew=true 2019-04-28 17:51:07 -04:00
Raman Gupta
bacb009902 Fix help output 2019-04-28 17:50:12 -04:00
Raman Gupta
111a8e7572 Polish pull request 2018-11-01 12:10:23 -04:00
Stefan Armbruster
573b1df2da Remove empty pages based on cmd line option 2018-11-01 12:10:20 -04:00
Stefan Armbruster
a51b262058 add cmd line option for overriding $DEVICE 2018-10-28 13:44:34 +01:00
Raman Gupta
0b42ed821d Remove use of stack.sh, use bash arrays 2016-01-21 01:35:58 -05:00
Raman Gupta
e993b5bebd Improve the usage output 2016-01-20 19:38:53 -05:00
Raman Gupta
e983c2989f Support non-standard page size outputs with crop 2016-01-20 19:38:23 -05:00
Raman Gupta
5c71571399 Support scanning into an output list
When scanning multiple pages, sometimes it is useful to write out
each page scanned to a separately named file.

The new --outputlist argument allows that mode of operation.
2016-01-20 19:36:47 -05:00
Raman Gupta
8dd7ff6d60 Add driver deskew and crop options 2015-09-26 14:06:54 -04:00
Raman Gupta
ab56bbcbc1 Fix usage output 2015-09-26 13:34:52 -04:00
Raman Gupta
143f2174f3 Fujitsu Scansnap S1500 scanning 2015-09-26 13:14:59 -04:00