diff options
-rwxr-xr-x | masterkey-sign.sh | 11 | ||||
-rwxr-xr-x | normalize-pdf | 2 | ||||
-rwxr-xr-x | ocr-scan | 2 | ||||
-rwxr-xr-x | scan-multi | 4 | ||||
-rwxr-xr-x | spotify | 2 |
5 files changed, 9 insertions, 12 deletions
diff --git a/masterkey-sign.sh b/masterkey-sign.sh index 5adddbd..b67357d 100755 --- a/masterkey-sign.sh +++ b/masterkey-sign.sh @@ -2,11 +2,8 @@ set -e -dir=$1 -key=$2 +key=$1 -export GNUPGHOME="$dir" - -gpg --homedir "$dir" --keyserver pgp.mit.edu --quiet --recv-keys "$key" -printf 'y\ny\n' | gpg --homedir "$dir" --default-key 0xA88E23E377514E00 --command-fd 0 --batch --quiet --sign-key "$key" -gpg --homedir "$dir" --keyserver pgp.mit.edu --send-keys "$key" +gpg --keyserver pgp.mit.edu --quiet --recv-keys "$key" +printf 'y\ny\n' | gpg --default-key 0xA88E23E377514E00 --command-fd 0 --batch --quiet --sign-key "$key" +gpg --keyserver pgp.mit.edu --send-keys "$key" diff --git a/normalize-pdf b/normalize-pdf index 0c873ef..189cb31 100755 --- a/normalize-pdf +++ b/normalize-pdf @@ -1,3 +1,3 @@ #!/bin/bash -convert -density 300 "$1" -normalize -compress jpeg -quality 75 "${1%.pdf}_normalized.pdf" +convert -density 300 "$1" -normalize -compress jpeg -quality 70 "${1%.pdf}_normalized.pdf" @@ -4,7 +4,7 @@ jpeg_quality=70 jpeg_size=1500x1500 time=$(date +%Y-%m-%d_%H%M%S) -scanimage --resolution 300 -b -x 215 -y 297 +scanimage --resolution 300 -b -x 210 -y 297 i=1 while [[ -e "out$i.pnm" ]]; do img="out$i.pnm" @@ -4,12 +4,12 @@ jpeg_quality=70 jpeg_size=1500x1500 time=$(date +%Y-%m-%d_%H%M%S) -scanimage --resolution 200 -b -x 215 -y 297 +scanimage --resolution 200 -b -x 210 -y 297 i=1 while [[ -e "out$i.pnm" ]]; do img="out$i.pnm" newname="$(printf "%s_%03d" "$time" "$i")" - convert "$img" -normalize -resize $jpeg_size -quality $jpeg_quality "$newname.jpg" && rm "$img" + convert "$img" -resize $jpeg_size -quality $jpeg_quality "$newname.jpg" && rm "$img" ((i++)) done @@ -1,4 +1,4 @@ #!/bin/bash - +mkdir /tmp/spotify-$UID/ wmctrl -xR spotify.Spotify || /usr/bin/spotify |