blob: 8ae7304b3c1c59c73e51bb8f06696d043314af21 (
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 -x 214.98 -y 294.973 --resolution $resolution | convert - "$file"
|