diff --git a/Debian/scan2thunderbird_0.2.deb b/Debian/scan2thunderbird_0.2.deb new file mode 100644 index 0000000..30dc27a Binary files /dev/null and b/Debian/scan2thunderbird_0.2.deb differ diff --git a/Debian/scan2thunderbird_1.0-beta.deb b/Debian/scan2thunderbird_1.0-beta.deb new file mode 100644 index 0000000..1c134c6 Binary files /dev/null and b/Debian/scan2thunderbird_1.0-beta.deb differ diff --git a/Debian/scan2thunderbird_1.0.deb b/Debian/scan2thunderbird_1.0.deb new file mode 100644 index 0000000..eef03e6 Binary files /dev/null and b/Debian/scan2thunderbird_1.0.deb differ diff --git a/Icons/s2t.png b/Icons/s2t.png new file mode 100644 index 0000000..b5c4e4e Binary files /dev/null and b/Icons/s2t.png differ diff --git a/Icons/scan2thunderbird.png b/Icons/scan2thunderbird.png new file mode 100644 index 0000000..46c12e1 Binary files /dev/null and b/Icons/scan2thunderbird.png differ diff --git a/Icons/scan2thunderbird.svg b/Icons/scan2thunderbird.svg new file mode 100644 index 0000000..a0abbb6 --- /dev/null +++ b/Icons/scan2thunderbird.svg @@ -0,0 +1,330 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Icons/scan2thunderbird.xcf b/Icons/scan2thunderbird.xcf new file mode 100644 index 0000000..0b2322a Binary files /dev/null and b/Icons/scan2thunderbird.xcf differ diff --git a/README.md~ b/README.md~ deleted file mode 100644 index 0d4f921..0000000 --- a/README.md~ +++ /dev/null @@ -1,76 +0,0 @@ -Scan2Thunderbird -========== - -GNU Public License v3 - -Copyright © 2012 Aurélien PIERRE - -http://aurelienpierre.com - aurelien[at]aurelienpierre.com -_______________________________________________________ - -Scan2Thunderbird is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see -_______________________________________________________ -Plateform : GNU/Linux -Tested on : Ubuntu 12.04 - -To run, this script needs this packages : sane, imagemagick, gzip, thunderbird & shred - -_______________________________________________________ - -Aim of the script -= -This program is designed for people who have to scan single ou multiple pages files in order to send them by email. -It is usefull for those who don't care about several options and complicated settings. It is simple and efficient. - -I designed it to help my grand-father to scan my administrative documents and to send me them by email, while I am not at home during long time. - -_______________________________________________________ - -Running the script -= -In a shell, type : - -$ cd script-directory - -$ sh scan2thunderbird.sh - -That's it ! - -You can optionnaly make a launcher with gnome-menu, for example. In this case, don't forget to check "Shell application" option. - -_______________________________________________________ - -Options -= -At the beginning of the script, you can choose : - -- the number of pages to scan, -- color or black & white outpout. - -All the rest is automatic. - -You can run several times the programm in the same instance. - -_______________________________________________________ -Outpout -= -The outpout generated by the programm is a PDF file compressed at maximum with gzip. It is directly returned as attachment in Thunderbird after processing. - -For multiple pages documents, all images are gathered in the same PDF. - -The images are encoded in JPEG, 300 DPI resolution and compressed at 90% quality by default. - -If the compressed PDF file weights more than 5 Mo (common mail privider restriction), the script asks you if you want to compress it again : the first recompression converts images to 150 DPI resolution, the next recompressions decreases quality of 5 % each time. - -You can recompress outpout PDF much as it is necessary. - -_______________________________________________________ -Support and suggestions -= -Every idea to improve the script is welcome. Send me an email at : aurelien[at]aurelienpierre.com - -For support and help, go to Github repository, section "Issues" : https://github.com/aurelienpierre/Scan2Thunderbird/issues - -Thanks and good scans ! \ No newline at end of file diff --git a/scan2thunderbird.conf~ b/Scripts/scan2thunderbird.conf old mode 100755 new mode 100644 similarity index 100% rename from scan2thunderbird.conf~ rename to Scripts/scan2thunderbird.conf diff --git a/scan2thunderbird.lang~ b/Scripts/scan2thunderbird.lang old mode 100755 new mode 100644 similarity index 100% rename from scan2thunderbird.lang~ rename to Scripts/scan2thunderbird.lang diff --git a/scan2thunderbird.sh~ b/Scripts/scan2thunderbird.sh old mode 100755 new mode 100644 similarity index 88% rename from scan2thunderbird.sh~ rename to Scripts/scan2thunderbird.sh index 8edb990..c8084dc --- a/scan2thunderbird.sh~ +++ b/Scripts/scan2thunderbird.sh @@ -1,22 +1,22 @@ #!/bin/bash -# Scan2Thunderbird GUI # -# v0.2 # -# # +# Scan2Thunderbird GUI # +# v1.0 # +# # # To run, this script needs this packages : # # sane, imagemagick, gzip, thunderbird, zenity & shred # # # # GNU Public License v3 # # # # Copyright © 2012 Aurélien PIERRE # -# https://aurelienpierre.com - aurelien@aurelienpierre.com # +# https://aurelienpierre.com - aurelien@aurelienpierre.com # # # # # # Scan2Thunderbird is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful,# # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # @@ -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 } @@ -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 @@ -281,23 +275,21 @@ 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'" + evince /tmp/$name.pdf & + thunderbird -compose "to='',subject='',body='',attachment='file:///tmp/$name.pdf'" wait $! - if [ ps -p $! ]; then - sleep 500 - fi + while [ ps -p $! ] + do + sleep 500 + done delete=`zenity --question --text="$txt24 $name.pdf ?"` @@ -306,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 diff --git a/changelog~ b/changelog~ deleted file mode 100644 index 3ed124f..0000000 --- a/changelog~ +++ /dev/null @@ -1,27 +0,0 @@ -Scan2Thunderbird -GNU Public License v3 - -Copyright 2012-2013 Aurélien PIERRE -aurelien@aurelienpierre.com - -*** v1.0-beta *** - -- Ability to save a PDF copy of the generated file after sending -- Control preview before sending -- Temporary files are saved in /tmp/ directory to fit system-wide installation of Scan2Thunderbird (packaged version) -- Several bugs fixed (message and notifications) -- Several code optimizations. - -*** v0.2 *** - -First GUI version. - -- Automatically check and resize files in order to fit mailbox limitations -- Implementation of Zenity/Gtk lib -- Addition of configuration file -- Addition of language file (French/English) - Language selection based on system settings -- Automatic cropping in A4 format. - -*** v0.1 *** - -Initial commit. Command line only. diff --git a/scan2thunderbird-fr_FR.po~ b/scan2thunderbird-fr_FR.po~ deleted file mode 100644 index 9975db6..0000000 --- a/scan2thunderbird-fr_FR.po~ +++ /dev/null @@ -1,85 +0,0 @@ -# French translations for Scan package -# Traductions françaises du paquet Scan. -# Copyright (C) 2012 THE Scan'S COPYRIGHT HOLDER -# This file is distributed under the same license as the Scan package. -# Aurélien PIERRE , 2012. -# -msgid "" -msgstr "" -"Project-Id-Version: Scan 2Thunderbird\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-28 05:29+0100\n" -"PO-Revision-Date: 2012-11-28 05:32+0100\n" -"Last-Translator: Aurélien PIERRE \n" -"Language-Team: French\n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: scan2thunderbird.sh:112 -#, sh-format -msgid "Please put the next page in the scanner" -msgstr "Veuillez entrer le nombre de pages à numériser" - -#: scan2thunderbird.sh:122 -#, sh-format -msgid "# Merging files into the same PDF" -msgstr "# Assemblage des fichiers dans le même PDF" - -#: scan2thunderbird.sh:127 -#, sh-format -msgid "# Done." -msgstr "# Terminé." - -#: scan2thunderbird.sh:129 -#, sh-format -msgid "Scan in progress" -msgstr "Numérisation en cours" - -#: scan2thunderbird.sh:130 -#, sh-format -msgid "Looking on the scanner..." -msgstr "Recherche du scanner..." - -#: scan2thunderbird.sh:193 -#, sh-format -msgid "No supported scanner" -msgstr "Aucun scanner reconnu" - -#: scan2thunderbird.sh:193 -#, sh-format -msgid "No valid device is detected. Please verify your configuration to run the script." -msgstr "Aucun périphérique valide n'a été détecté. Merci de vérifier votre configuration avant de lancer le script." - -#: scan2thunderbird.sh:196 -#, sh-format -msgid "Detected device" -msgstr "Périphérique détecté" - -#: scan2thunderbird.sh:200 -#, sh-format -msgid "Number of pages" -msgstr "Nombre de pages" - -#: scan2thunderbird.sh:200 -#, sh-format -msgid "Please enter the number of pages to scan" -msgstr "Veuillez entrer le nombre de pages à numériser" - -#: scan2thunderbird.sh:206 -#, sh-format -msgid "Is the source document in color ?" -msgstr "Le document source est-il en couleur" - -#: scan2thunderbird.sh:207 -#, sh-format -msgid "Check" -msgstr "Chochez" - -#: scan2thunderbird.sh:207 -#, sh-format -msgid "Color" -msgstr "Couleur" -