57 Commits

Author SHA1 Message Date
Raman Gupta
7fb8e60954
Merge pull request #21 from p/quote-device
Quote the device argument
2021-07-27 01:11:05 -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
d33c8caa71 performance: pnmtops to temp file
For some reason when piping the output of pnmtops directly to ps2pdf,
conversion is very slow (especially for color scans).

When writing to an intermediate temporary file, conversion is fast.

Before:

________________________________________________________
Executed in   19.20 secs   fish           external
  usr time    4.01 secs    0.32 millis    4.01 secs
  sys time   20.63 secs    5.30 millis   20.62 secs

After:

________________________________________________________
Executed in  368.06 millis    fish           external
   usr time  378.06 millis    0.00 millis  378.06 millis
   sys time  100.00 millis    2.79 millis   97.21 millis

An improvement of over 50 times!

This should resolve #19.
v1.2
2021-03-10 22:07:09 -05:00
Raman Gupta
dad716786e Merge branch 'issue-16' into master 2020-11-03 10:08:12 -05:00
Raman Gupta
8e6e27a7b3 README: add optional bc dependency 2020-11-03 10:08:03 -05:00
Raman Gupta
b59999717e Allow disable default page size 2020-11-02 15:21:49 -05:00
Raman Gupta
ed98da9c43 Add units dependency to README
See issue #15
2020-11-02 11:22:33 -05:00
Raman Gupta
33f3f9e2ea README: link to dependencies wiki page v1.1-beta v1.1 2020-08-04 10:02:04 -04:00
Raman Gupta
6b313943bb Use bash built-in tests, additional arg parsing checks 2020-07-30 13:53:17 -04:00
Raman Gupta
e9b606c1a7 README: add link to other software 2020-07-29 22:10:46 -04:00
Raman Gupta
f3a743ac72 Minor logging output improvements 2020-07-29 22:02:38 -04:00
Raman Gupta
982090acf8 More temp file cleanup 2020-07-29 22:02:24 -04:00
Raman Gupta
9b71320fa0 Run image to tiff conversion CPU constrained 2020-07-29 22:01:55 -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
aa93b62873 Merge branch 'issue-12' into master 2020-07-29 18:02:08 -04:00
Raman Gupta
b6ff50a4b0 Specify dpi in image header for tesseract
See https://github.com/tesseract-ocr/tesseract/issues/150
2020-07-29 18:01:20 -04:00
Raman Gupta
30a7be1fd8 Merge branch 'issue-9' into master 2020-07-29 17:17:50 -04:00
Raman Gupta
759f79ae7c Merge branch 'issue-8' into master 2020-07-29 17:17:48 -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
24882e4397 Merge branch 'issue-6' into master 2020-04-06 22:29:21 -04:00
Raman Gupta
906ffc983f Test for -verbose flag on pnmtops 2020-04-05 17:13:22 -04:00
Raman Gupta
a2414b66fe Update README again re sem dependency 2020-04-05 16:51:36 -04:00
Raman Gupta
9143a41236 usage: note about truncate after skip empty 2020-04-01 01:38:51 -04:00
Raman Gupta
ae0f18cc5d Update README re sem dependency v1.0 2019-08-09 02:19:10 -04:00
Raman Gupta
b38a37793d Merge branch 'issue-4' into master 2019-08-09 02:16:32 -04:00
Raman Gupta
38102d8086 Constrain per page processing CPU usage 2019-08-08 10:30:45 -04:00
Raman Gupta
681bf005b3
Merge pull request #3 from artjomsimon/master
Parse argument for --language
2019-05-26 22:14:48 -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
d1922081ec README: Add white pages skip feature 2018-11-01 12:26:55 -04:00
Raman Gupta
038b853315 Merge branch 'remove-empty-pages' 2018-11-01 12:19:35 -04:00
Raman Gupta
be6eb44b5d Change white threshold to 99.8 2018-11-01 12:19:19 -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
Raman Gupta
349e0a5dea
Merge pull request #1 from sarmbruster/override_device
add cmd line option for overriding $DEVICE
2018-10-28 10:10:05 -04:00
Stefan Armbruster
a51b262058 add cmd line option for overriding $DEVICE 2018-10-28 13:44:34 +01:00
Raman Gupta
e68d1cb1c9 README: add pdfunite to requirements 2018-01-06 13:36:02 -05:00
Raman Gupta
179eaef7a9 README: add note about parallel post-processing 2018-01-06 13:32:44 -05:00
Raman Gupta
7e106f17fc README: add output of --help 2018-01-06 13:29:59 -05:00
Raman Gupta
f4e3e8a392 README: update requirements 2018-01-06 13:26:21 -05:00
Raman Gupta
6094a70fad Update license date 2016-01-21 01:37:08 -05:00
Raman Gupta
0b42ed821d Remove use of stack.sh, use bash arrays 2016-01-21 01:35:58 -05:00
Raman Gupta
51d2afcd54 README: core function at the top 2016-01-20 19:52:41 -05:00
Raman Gupta
670f89477a Create README 2016-01-20 19:51:11 -05:00
Raman Gupta
e993b5bebd Improve the usage output 2016-01-20 19:38:53 -05:00