summaryrefslogtreecommitdiff
path: root/dot/local/bin/scan
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2024-01-19 12:01:49 -0500
committerAndrew Cady <d@jerkface.net>2024-01-19 12:01:49 -0500
commita74be3f9e73d9dd10eee890e673d00bfb44e5cfb (patch)
treed6ac57f28cdd7bf0283234e4730275c0b6afb565 /dot/local/bin/scan
parent66a483f0101ec54bd8db0f7d20ed83fe2f615cf4 (diff)
parentf58705ed7c600a1d394c6949bb7e21cfd29e6260 (diff)
Merge commit 'f587'HEADmaster
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"