blob: e07ca4d88f6e9946bdf268091bc5806375690b1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/bash
if [[ $1 == -h ]]; then
echo "usage: scan [<resolution> [<format> [<extra name>]]]"
exit
fi
resolution=${1:-200}
format=${2:-jpg}
extra=$3
if [[ -n $extra ]]; then
extra="_$extra"
fi
file="scan_$(date +%Y-%m-%d_%H%M%S)${extra}.${format}"
scanimage --resolution $resolution | convert - "$file"
|