diff options
author | Florian Pritz <bluewind@xinu.at> | 2016-12-01 16:03:59 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2016-12-01 16:03:59 +0100 |
commit | 0ea8f6c97c58d3b95f7ab3951b08dea73e566082 (patch) | |
tree | 16530fef0fbd0ec1a6c14da361669fe56e349b69 | |
parent | 878f2b65cc13c38d69d5c98a15cd17130da08d32 (diff) | |
download | bin-0ea8f6c97c58d3b95f7ab3951b08dea73e566082.tar.gz bin-0ea8f6c97c58d3b95f7ab3951b08dea73e566082.tar.xz |
misc
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-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 |