Ajout script pour numérisation 8.5"x11"
authorHugo Villeneuve <hugo@hugovil.com>
Tue, 30 Apr 2013 01:08:33 +0000 (21:08 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Tue, 30 Apr 2013 01:08:33 +0000 (21:08 -0400)
stage2/hv-utilities/hv-scan [new file with mode: 0755]
stage2/install-hv-utilities

diff --git a/stage2/hv-utilities/hv-scan b/stage2/hv-utilities/hv-scan
new file mode 100755 (executable)
index 0000000..939cf5d
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+JPEG_QUALITY=10
+
+print_usage()
+{
+    echo "$(basename $0) -- Numérisation image monochrome 8.5\"x11\" en PDF"
+    echo "Usage: $(basename $0) [OPTIONS...] FICHIER"
+}
+
+if [ "x${1}" = "x--help" ]; then
+    print_usage
+    exit 1
+fi
+
+if [ ${#} -ne 1 ]; then
+    print_usage
+    exit 1
+fi
+
+src=${1}
+
+scanimage --mode Gray --resolution 200 --scan-area Letter | \
+    convert - -compress jpeg -quality ${JPEG_QUALITY} ${src}.pdf
index 076d32d..a61afba 100755 (executable)
@@ -11,7 +11,7 @@ BIN_UTILITIES="camera-download cd-erase cd-copy cgrep pstopdf distro-backup \
                dos2unix dvd-ram-format fix-avi gztobz2 hv-backup hv-video-dvd \
                mail-files mail-if-fail mail-statistics media-write pstopdf \
                replace.pl rotatelogs setdate strip-debug-symbols tarbz2 \
-               tildes-clean vd vs vl flac2ogg flac2mp3"
+               tildes-clean vd vs vl flac2ogg flac2mp3 hv-scan"
 
 for program in ${BIN_UTILITIES}; do
     install -v ${SRCDIR}/${program} ${BINDIR}