summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon GECOS <u@adam>2023-10-15 15:59:14 -0400
committerGordon GECOS <u@adam>2023-10-15 15:59:14 -0400
commite95feaf7eb4a60c94e168ed5099b824f653fc8c9 (patch)
tree463a0ecc594ce242853c607f1b7efa0a65e0d71b
parent292aa88004fcc90bd176f85e190caa7829556cc6 (diff)
dot/local/bin/scan
-rw-r--r--dot/local/bin/scan19
1 files changed, 10 insertions, 9 deletions
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 @@
1#!/bin/sh 1#!/bin/sh
2NOW=$( TZ=UTC date -Ins | tr T . | tr -d : | sed -E 's/(..),(...).*/\1.\2/' ) 2NOW=$( TZ=UTC date -Ins | tr T . | tr -d : | sed -E 's/(..),(...).*/\1.\2/' )
3 3
4if [ $# = 0 ] 4if [ "$ACTUAL_BATCH" -a $# = 0 ]
5then 5then
6 ACTUAL_BATCH= 6 FORMAT=scan_${NOW}_%.3d.png
7fi
8
9if $ACTUAL_BATCH
10then
11 format=scan_${NOW}_%.3d.png
12else 7else
13 format=scan_${NOW}.png 8 FORMAT=scan_${NOW}.png
14fi 9fi
15 10
16scanimage --mode=Color --progress --format=png --batch="$format" 11RESOLUTION=600
12
13scanimage --progress \
14 --mode=Color \
15 --resolution="$RESOLUTION" \
16 --format=png \
17 --batch="$FORMAT"