diff options
author | Florian Pritz <bluewind@xinu.at> | 2011-07-10 21:46:09 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2011-07-10 21:48:01 +0200 |
commit | d2a44efbe707b7210107fabce58fb99c1a3b251e (patch) | |
tree | c5527ba09d85d044326a06393ad8d0f88d8ac167 /scan | |
parent | 5a311acfe51d396dd65fe72ec478ceebea64f6c1 (diff) | |
download | bin-d2a44efbe707b7210107fabce58fb99c1a3b251e.tar.gz bin-d2a44efbe707b7210107fabce58fb99c1a3b251e.tar.xz |
mass commit
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'scan')
-rwxr-xr-x | scan | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -0,0 +1,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" |