summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElla Grapp <ella@blackboard>2022-11-28 22:47:04 -0500
committerElla Grapp <ella@blackboard>2022-11-28 22:47:04 -0500
commit92c1d8318c2d6d54566f7a1398e1ce5df2a41d6d (patch)
tree57ad8e280b8ca52778c082a0ef4afc752c8267e6
parent624658b8991650401852c60ee9c73615a6c22e89 (diff)
new command: scan
-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"