summaryrefslogtreecommitdiff
path: root/dot/local/bin/scan
diff options
context:
space:
mode:
Diffstat (limited to '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 2ba071b..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 --progress --format=png --batch="$format" 11RESOLUTION=600
12
13scanimage --progress \
14 --mode=Color \
15 --resolution="$RESOLUTION" \
16 --format=png \
17 --batch="$FORMAT"