summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dot/local/bin/scan16
1 files changed, 16 insertions, 0 deletions
diff --git a/dot/local/bin/scan b/dot/local/bin/scan
new file mode 100644
index 0000000..2ba071b
--- /dev/null
+++ b/dot/local/bin/scan
@@ -0,0 +1,16 @@
1#!/bin/sh
2NOW=$( TZ=UTC date -Ins | tr T . | tr -d : | sed -E 's/(..),(...).*/\1.\2/' )
3
4if [ $# = 0 ]
5then
6 ACTUAL_BATCH=
7fi
8
9if $ACTUAL_BATCH
10then
11 format=scan_${NOW}_%.3d.png
12else
13 format=scan_${NOW}.png
14fi
15
16scanimage --progress --format=png --batch="$format"