Skip to content

Commit

Permalink
Remove Gzip compression
Browse files Browse the repository at this point in the history
Signed-off-by: Aurélien PIERRE <[email protected]>
  • Loading branch information
aurelienpierre committed Jan 4, 2015
1 parent e1dc36a commit 96a19aa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
4 changes: 4 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ GNU Public License v3
Copyright 2012-2013 Aurélien PIERRE
[email protected]

*** v1.0 final ***

- Remove Gzip compression of the PDF file

*** v1.0-beta ***

- Ability to save a PDF copy of the generated file after sending
Expand Down
Empty file modified scan2thunderbird.conf
100755 → 100644
Empty file.
Empty file modified scan2thunderbird.lang
100755 → 100644
Empty file.
16 changes: 3 additions & 13 deletions scan2thunderbird.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ rescan() {
clean() {
shred -n 35 -z -u /tmp/$name-*.tiff
shred -n 35 -z -u /tmp/$name-*.jpeg
shred -n 35 -z -u /tmp/$name.pdf.gz
shred -n 35 -z -u /tmp/$name*.pdf
}

Expand Down Expand Up @@ -258,14 +257,9 @@ quit "$?"
--auto-close
quit "$?"

# Compress the PDF file

cp /tmp/$name.pdf /tmp/$name-2.pdf
gzip --best -f /tmp/$name.pdf

# Check file weight

FILESIZE=$(stat -c%s "/tmp/$name.pdf.gz")
FILESIZE=$(stat -c%s "/tmp/$name.pdf")

qual=$quality

Expand All @@ -281,18 +275,15 @@ quit "$?"
rescan "$min_resolution" "$min_crop" "$pages" "$couleur" "$qual"
merge "$min_resolution" "$min_crop" "$pages" "$couleur" "$qual"

cp /tmp/$name.pdf /tmp/$name-2.pdf
gzip --best -f /tmp/$name.pdf

FILESIZE=$(stat -c%s "/tmp/$name.pdf.gz")
FILESIZE=$(stat -c%s "/tmp/$name.pdf")

qual=$(($qual-1))
done

# Preview and send

evince /tmp/$name-2.pdf &
thunderbird -compose "to='',subject='',body='$txt9',attachment='file:///tmp/$name.pdf.gz'"
thunderbird -compose "to='',subject='',body='',attachment='file:///tmp/$name.pdf'"
wait $!

while [ ps -p $! ]
Expand All @@ -307,7 +298,6 @@ quit "$?"

if [ "$?" -eq "0" ]; then
file=`zenity --file-selection --save --filename=/$HOME/$USER/ --title="$txt25 ?"`
cp /tmp/$name-2.pdf /$file.pdf
clean
else
clean
Expand Down

0 comments on commit 96a19aa

Please sign in to comment.