diff options
author | Andrew Cady <d@jerkface.net> | 2024-01-19 12:01:49 -0500 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2024-01-19 12:01:49 -0500 |
commit | a74be3f9e73d9dd10eee890e673d00bfb44e5cfb (patch) | |
tree | d6ac57f28cdd7bf0283234e4730275c0b6afb565 /dot/local/bin/scan | |
parent | 66a483f0101ec54bd8db0f7d20ed83fe2f615cf4 (diff) | |
parent | f58705ed7c600a1d394c6949bb7e21cfd29e6260 (diff) |
Diffstat (limited to 'dot/local/bin/scan')
-rw-r--r-- | dot/local/bin/scan | 19 |
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 |
2 | NOW=$( TZ=UTC date -Ins | tr T . | tr -d : | sed -E 's/(..),(...).*/\1.\2/' ) | 2 | NOW=$( TZ=UTC date -Ins | tr T . | tr -d : | sed -E 's/(..),(...).*/\1.\2/' ) |
3 | 3 | ||
4 | if [ $# = 0 ] | 4 | if [ "$ACTUAL_BATCH" -a $# = 0 ] |
5 | then | 5 | then |
6 | ACTUAL_BATCH= | 6 | FORMAT=scan_${NOW}_%.3d.png |
7 | fi | ||
8 | |||
9 | if $ACTUAL_BATCH | ||
10 | then | ||
11 | format=scan_${NOW}_%.3d.png | ||
12 | else | 7 | else |
13 | format=scan_${NOW}.png | 8 | FORMAT=scan_${NOW}.png |
14 | fi | 9 | fi |
15 | 10 | ||
16 | scanimage --progress --format=png --batch="$format" | 11 | RESOLUTION=600 |
12 | |||
13 | scanimage --progress \ | ||
14 | --mode=Color \ | ||
15 | --resolution="$RESOLUTION" \ | ||
16 | --format=png \ | ||
17 | --batch="$FORMAT" | ||