Re: modification d'un script nautilus

2010-12-22 Par sujet Avell Diroll
On 21/12/10 19:33, Fred -Z wrote:
 J'aimerai modifier ce script nautilus qui sert a changer de
 splashscreen, j'aimerai ajouter la conversion de l'image au bon format
 4/3 car sue le net les images que je télécharge sont souvent au 16/10!!
 il faudrait ajouter ceci (a adapter), car je voudrai que ce soit l'image
 que j'ai sélectionnée n'ai pas le chemin dans home/image mais du
 curpath pour que le script marche!

 convert $HOME/Images/image_exemple.jpg -resize 1024x768! -depth 16 
 $HOME/Images/image_exemple_au_bon_format.jpg

 Voilà le script en questions :
(snip)
 Je ne sais pas s'il faudrai juste ajouter ceci entre cd $curpath  et
 gconf editor et enlever le # entre...
 Je voudrai toutes les convertir au format 1280x1024

 convert *.jpg -resize 1280x1024! -depth 16 *.png

C'est presque ça.

Voici une solution ... il est à noté que l'iamge se trouve transformée 
sans sauvegarde du format original:

#

#!/bin/bash
#
curpath=`echo $NAUTILUS_SCRIPT_CURRENT_URI | sed 's/file\:\/\///'`
cd $curpath
#
convert $curpath/$1 -resize 1280x1024! -depth 16 $curpath/$1
#
gconftool-2 --type string --set /apps/gnome-session/options/splash_image 
$curpath/$1

#

Bonne continuation

Ju
-- 
As a circle of light increases so does the circumference of darkness 
around it.
--Albert Einstein

-- 
Liste de diffusion ubuntu-fr ubuntu-fr@lists.ubuntu.com
Pour s'abonner ou se désabonner : 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-fr


re modification d'un script nautilus

2010-12-22 Par sujet Fred -Z
Ju a écrit :

C'est presque ça.

Voici une solution ... il est à noté que l'iamge se trouve transformée 
sans sauvegarde du format original:

#

#!/bin/bash
#
curpath=`echo $NAUTILUS_SCRIPT_CURRENT_URI | sed 's/file\:\/\///'`
cd $curpath
#
convert $curpath/$1 -resize 1280x1024! -depth 16 $curpath/$1
#
gconftool-2 --type string --set /apps/gnome-session/options/splash_image 
$curpath/$1

#

Bonne continuation

Ju
-- As a circle of light increases so does the circumference of darkness 
around it. --Albert Einstein
-- Liste de diffusion ubuntu-fr ubuntu-fr@lists.ubuntu.com Pour 
s'abonner ou se désabonner : 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-fr




Merci, mais en fait je voudrai la transformer au format png.

frédéric Z

-- 
Liste de diffusion ubuntu-fr ubuntu-fr@lists.ubuntu.com
Pour s'abonner ou se désabonner : 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-fr


Re: re modification d'un script nautilus

2010-12-22 Par sujet Avell Diroll
On 22/12/10 11:59, Fred -Z wrote:
 Ju a écrit :
 C'est presque ça.

 Voici une solution ... il est à noté que l'iamge se trouve transformée
 sans sauvegarde du format original:
(snip)

 Merci, mais en fait je voudrai la transformer au format png.

voilà:

#

#!/bin/bash
#
curpath=`echo $NAUTILUS_SCRIPT_CURRENT_URI | sed 's/file\:\/\///'`
cd $curpath
#
oldname=$1
newname=${oldname%.*}.png
convert $curpath/$oldname -resize 1280x1024! -depth 16 $curpath/$newname
#uncomment if you don't want to keep the original:
# rm $curpath/$oldname
#
gconftool-2 --type string --set /apps/gnome-session/option/splash_image 
$curpath/$newname

#


Ju
-- 
Every decent man is ashamed of the government he lives under.
--H.L. Mencken

-- 
Liste de diffusion ubuntu-fr ubuntu-fr@lists.ubuntu.com
Pour s'abonner ou se désabonner : 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-fr


Re: re modification d'un script nautilus

2010-12-22 Par sujet Fred -Z
Avell Diroll a écrit :
 On 22/12/10 11:59, Fred -Z wrote:
   
 Ju a écrit :
 
 C'est presque ça.

 Voici une solution ... il est à noté que l'iamge se trouve transformée
 sans sauvegarde du format original:
   
 (snip)
   
 Merci, mais en fait je voudrai la transformer au format png.
 

 voilà:

 #

 #!/bin/bash
 #
 curpath=`echo $NAUTILUS_SCRIPT_CURRENT_URI | sed 's/file\:\/\///'`
 cd $curpath
 #
 oldname=$1
 newname=${oldname%.*}.png
 convert $curpath/$oldname -resize 1280x1024! -depth 16 $curpath/$newname
 #uncomment if you don't want to keep the original:
 # rm $curpath/$oldname
 #
 gconftool-2 --type string --set /apps/gnome-session/option/splash_image 
 $curpath/$newname

 #


 Ju
   

Merci beaucoup, c'est ce que je voulait!

Frédéric Z


-- 
Liste de diffusion ubuntu-fr ubuntu-fr@lists.ubuntu.com
Pour s'abonner ou se désabonner : 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-fr


modification d'un script nautilus

2010-12-21 Par sujet Fred -Z
Bonjour,

J'aimerai modifier ce script nautilus qui sert a changer de 
splashscreen, j'aimerai ajouter la conversion de l'image au bon format 
4/3 car sue le net les images que je télécharge sont souvent au 16/10!!
il faudrait ajouter ceci (a adapter), car je voudrai que ce soit l'image 
que j'ai sélectionnée n'ai pas le chemin dans home/image mais du 
curpath pour que le script marche!

convert $HOME/Images/image_exemple.jpg -resize 1024x768! -depth 16 
$HOME/Images/image_exemple_au_bon_format.jpg



Voilà le script en questions :

#!/bin/bash
#
# Tools-Set_as_Splash - (set image as splash screen)
#
# Owner : Largey Patrick from Switzerland
# patrick.lar...@nazeman.org
#  www.nazeman.org
#
# Licence : GNU GPL
#
# Copyright (C) Nazeman
#
# Dependency : Nautilus
#
# Encoding UTF-8
#
# Vers.: 1.00 11.02.2004
#
# fix gnome 2.2 bug
#
curpath=`echo $NAUTILUS_SCRIPT_CURRENT_URI | sed 's/file\:\/\///'`
cd $curpath
#
# gconf editor
#
gconftool-2 --type string --set /apps/gnome-session/options/splash_image 
$curpath/$1

   

Je ne sais pas s'il faudrai juste ajouter ceci entre cd $curpath  et 
gconf editor et enlever le # entre...
Je voudrai toutes les convertir au format 1280x1024

convert *.jpg -resize 1280x1024! -depth 16 *.png


Merci d'avance et j'espère que ma demande est clair!

Frédéric Z.

-- 
Liste de diffusion ubuntu-fr ubuntu-fr@lists.ubuntu.com
Pour s'abonner ou se désabonner : 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-fr