From: Hugo Villeneuve Date: Tue, 30 Apr 2013 01:08:33 +0000 (-0400) Subject: Ajout script pour numérisation 8.5"x11" X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=7b0074fc0a137f66fba4594dd7fbffa45ebfc4d9;p=hvlinux.git Ajout script pour numérisation 8.5"x11" --- diff --git a/stage2/hv-utilities/hv-scan b/stage2/hv-utilities/hv-scan new file mode 100755 index 0000000..939cf5d --- /dev/null +++ b/stage2/hv-utilities/hv-scan @@ -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 diff --git a/stage2/install-hv-utilities b/stage2/install-hv-utilities index 076d32d..a61afba 100755 --- a/stage2/install-hv-utilities +++ b/stage2/install-hv-utilities @@ -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}