From e95feaf7eb4a60c94e168ed5099b824f653fc8c9 Mon Sep 17 00:00:00 2001 From: Gordon GECOS Date: Sun, 15 Oct 2023 15:59:14 -0400 Subject: dot/local/bin/scan --- dot/local/bin/scan | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'dot') diff --git a/dot/local/bin/scan b/dot/local/bin/scan index 2d3470c..2a7ac71 100644 --- a/dot/local/bin/scan +++ b/dot/local/bin/scan @@ -1,16 +1,17 @@ #!/bin/sh NOW=$( TZ=UTC date -Ins | tr T . | tr -d : | sed -E 's/(..),(...).*/\1.\2/' ) -if [ $# = 0 ] +if [ "$ACTUAL_BATCH" -a $# = 0 ] then - ACTUAL_BATCH= -fi - -if $ACTUAL_BATCH -then - format=scan_${NOW}_%.3d.png + FORMAT=scan_${NOW}_%.3d.png else - format=scan_${NOW}.png + FORMAT=scan_${NOW}.png fi -scanimage --mode=Color --progress --format=png --batch="$format" +RESOLUTION=600 + +scanimage --progress \ + --mode=Color \ + --resolution="$RESOLUTION" \ + --format=png \ + --batch="$FORMAT" -- cgit v1.2.3