Re: [Gimp-user] Question about scripting
- From: Ofnuts <ofnuts gmx com>
- To: gimp-user-list gnome org
- Subject: Re: [Gimp-user] Question about scripting
- Date: Sat, 30 Jul 2022 17:14:49 +0200
A problem you have is the multiple layers looking at your double quotes:
the shell interpreter that calls Gimp, and
the script-fu interpreter. Quotes are processed and not seen by Gimp and
script-fu.
Since you are on a Unix shell, try this:
printf "%s\n" gimp -i -b "(file-jpeg-load RUN-NONINTERACTIVE "/home/user/ev.jpg" "/home/user/ev.jpg")" -b
"(gimp-quit 0)"
This will print a line per "token" passed to the actual command:
gimp -i -b (file-jpeg-load RUN-NONINTERACTIVE /home/user/ev.jpg
/home/user/ev.jpg) -b (gimp-quit 0) As you can see, the quotes around the file names have been removed. You
have to either escape them:
printf "%s\n" gimp -i -b "(file-jpeg-load RUN-NONINTERACTIVE
\"/home/user/ev.jpg\" \"/home/user/ev.jpg\")" -b "(gim p-quit 0)" gimp
-i -b (file-jpeg-load RUN-NONINTERACTIVE "/home/user/ev.jpg"
"/home/user/ev.jpg") -b (gimp-quit 0) Or use outer single quotes (but this makes variable substitution in the
shell a bit contrived:
printf "%s\n" gimp -i -b '(file-jpeg-load RUN-NONINTERACTIVE
"/home/user/ev.jpg" "/home/user/ev.jpg")' -b '(gimp-qu it 0)' gimp -i -b
(file-jpeg-load RUN-NONINTERACTIVE "/home/user/ev.jpg"
"/home/user/ev.jpg") -b (gimp-quit 0)
Or, if script-fu supports it (that's what I do for pythin-fu), outer double qoutes and single quotes for the
scrpit-fu strin
printf "%s\n" gimp -i -b "(file-jpeg-load RUN-NONINTERACTIVE
'/home/user/ev.jpg' '/home/user/ev.jpg')" -b "(gimp-qu it 0)" gimp -i -b
(file-jpeg-load RUN-NONINTERACTIVE '/home/user/ev.jpg'
'/home/user/ev.jpg') -b (gimp-quit 0)
On 29/07/2022 05:00, Jean-Pierre HOARAU wrote:
I'm trying to write a script shell and use a procedure. I don't understand
how to give the parameters to the script. I do not have the good number or
parameters. Can someone write to me the command line that I have to enter
to use the procedures, for example, file-jpeg-load and file-jpeg-save? I
tried this and it doesn't work:
gimp -i -b "(file-jpeg-load RUN-NONINTERACTIVE "/home/user/ev.jpg"
"/home/user/ev.jpg")" -b "(gimp-quit 0)"
Thank you in advance.
_______________________________________________
gimp-user-list mailing list
List address:gimp-user-list gnome org
List membership:https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:https://mail.gnome.org/archives/gimp-user-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]