diff options
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" | ||