From ab56bbcbc191a1a75a642f33757e9abf6251226a Mon Sep 17 00:00:00 2001 From: Raman Gupta Date: Sat, 26 Sep 2015 13:18:10 -0400 Subject: [PATCH] Fix usage output --- scan | 10 ++++------ scan_perpage | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/scan b/scan index b9bd88a..36a2c98 100755 --- a/scan +++ b/scan @@ -21,9 +21,6 @@ PGWIDTH= PGWIDTHIN=8.5 VERBOSE=0 -# The unpaper processing reduces the file size considerably, so 300 dpi is selected. -# When not using unpaper (--nodskew) it is recommended to scan at a lower resolution e.g. 200 dpi. - # Parse command-line options while [ $# -gt 0 ]; do case "$1" in @@ -62,19 +59,20 @@ done if [ $HELP -eq 1 ]; then - echo "$(basename $0) [-d|--duplex] [-m|--mode] [-r|--resolution] [-o|--output] [-a|--append] [-e|--max] [-s|--size | [-ph|--page-height] [-pw|--page-width]] [--nodskew]" + echo "$(basename $0) [-v|--verbose] [-d|--duplex] [-m|--mode] [-r|--resolution] [-a|--append] [-e|--max ] [-t|--truncate ] [-s|--size | [-ph|--page-height] [-pw|--page-width]] [--deskew] [--ocr] [-o|--output ]" echo " -v Verbose output (this will slow down the scan due to the need to prevent interleaved output)" echo " -d Duplex scanning" echo " -m Mode e.g. Lineart (default), Halftone, Gray, Color, etc." echo " -r Resolution e.g 300 (default)" - echo " -o Output e.g. scan.pdf (default)" echo " -a Append output to existing scan" echo " -e Max number of pages e.g. 2 (default is all pages)" echo " -t Truncate number of pages from end e.g. 1 (default is none)" echo " -s Page Size as type e.g. Letter (default), Legal, A4" echo " -ph Custom Page Height in mm" echo " -pw Custom Page Width in mm" - echo " --nodskew Do not deskew (no unpaper)" + echo " --deskew Run deskew and black edge detection (requires unpaper)" + echo " --ocr Run OCR to make the PDF searchable (requires tesseract)" + echo " -o Output to named file default=scan.pdf" echo "" exit 0 fi diff --git a/scan_perpage b/scan_perpage index b5842bc..29ba2ec 100755 --- a/scan_perpage +++ b/scan_perpage @@ -54,10 +54,10 @@ process_page() { if [ $DESKEW -eq 1 ]; then log "Applying unpaper post-processing to image data..." PP_PREFIX="unpaper-" - #unpaper -v --no-mask-scan --overwrite --dpi $RESOLUTION --no-blackfilter $IMAGE_FILE $PP_PREFIX$IMAGE_FILE | logstdout if [ $VERBOSE = 1 ]; then UNPAPERVERBOSE="-v" fi + #unpaper $UNPAPERVERBOSE --no-mask-scan --overwrite --dpi $RESOLUTION --no-blackfilter $IMAGE_FILE $PP_PREFIX$IMAGE_FILE | logstdout unpaper $UNPAPERVERBOSE --overwrite --dpi $RESOLUTION $IMAGE_FILE $PP_PREFIX$IMAGE_FILE | logstdout fi log ""