updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / nautilus-gkim / GKIM_album
blobb4cbea6fc708f359144bd9065a14dfb3e22e91db
1 #!/bin/bash
2 # GKIM based on KIM
3 # Copyright (C) 2005,2006 Charles Bouveyron <charles.bouveyron@free.fr>
4 #
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 dir="$1";
20 nb=`zenity --list --title="Sélectionnez le type de l'album" --column="n°" --column="Type " 1 "1x1 portrait album" 2 "1x1 landscape album" 3 "1x2 landscape album" 4 "2x1 portrait album" 5 "2x2 landscape album" 6 "3x2 portrait album" 7 "3x4 landscape album" 8 "4x4 landscape album"`;
23 #test -n "$KDEHOME" || KDEHOME="`kde4-config --localprefix`"; export KDEHOME
24 #KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$USER"/kim.XXXXXXXX` || exit 1
25 KIMDIR=`mktemp -d /tmp/kim.XXXXXXXX` || exit 1
28 echo "10";
29 case "$nb" in
30 1) montage -tile 1x1 -geometry 800x600+5+5 -page 842x595 "$@" "$KIMDIR"/miniature.jpg
31 montage -tile 1x1 -geometry 600x800+5+5 -page 842x595 "$KIMDIR"/miniature*.jpg* `zenity --file-selection --title="Sauvegarder sous (pdf)..." --save`;;
33 2) montage -tile 1x1 -geometry 800x600+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg
34 montage -tile 1x1 -geometry 800x600+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `zenity --file-selection --title="Sauvegarder sous (pdf)..." --save`;;
36 3) montage -tile 1x2 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg
37 montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `zenity --file-selection --title="Sauvegarder sous (pdf)..." --save`;;
39 4) montage -tile 1x2 -geometry 640x480+5+5 -page 842x595 "$@" "$KIMDIR"/miniature.jpg
40 montage -tile 1x1 -geometry 480x640+5+5 -page 842x595 "$KIMDIR"/miniature*.jpg* `zenity --file-selection --title="Sauvegarder sous (pdf)..." --save`;;
42 5) montage -tile 2x2 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg
43 montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `zenity --file-selection --title="Sauvegarder sous (pdf)..." --save`;;
45 6) montage -tile 2x3 -geometry 640x480+5+5 -page 842x595 "$@" "$KIMDIR"/miniature.jpg
46 montage -tile 1x1 -geometry 480x640+5+5 -page 842x595 "$KIMDIR"/miniature*.jpg* `zenity --file-selection --title="Sauvegarder sous (pdf)..." --save`;;
48 7) montage -tile 4x3 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg
49 montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `zenity --file-selection --title="Sauvegarder sous (pdf)..." --save`;;
51 8) montage -tile 4x4 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg
52 montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `zenity --file-selection --title="Sauvegarder sous (pdf)..." --save`;;
54 *) zenity --error --text="GKim - Unrecognized option ! ";;
55 esac
57 echo "80";
58 #rm "$KIMDIR"/miniature*.jpg*
59 rm -rf "$KIMDIR"
60 echo "100";
61 )| zenity --progress \
62 --title="Création de l'album" \
63 --text="traitement" \
64 --percentage=0