size=5> Next Previous Contents

6. Running the scripts

Getting the write paramaters to pass to the script and getting everything properly escaped is a challenge in and of its self. There's two main points, one is that you need to pass a 1 as the first paramaters to make it run non-interactive, and the second is that you must escape the commands properly so script-fu gets them correctly.

Heres and example of launching the above script from the command line in a bash shell (other shell will vary...)

This is an example for 1.0 in bash.

bash% gimp --no-data -n -b '(script-fu-swirly-pattern 1 20 90 4
\""swirl.jpg\"")' '(gimp-quit)'
This is an example for 1.1 (cvs) in bash.

bash% gimp --console-messages -n -b '(script-fu-swirly-pattern 1 20 90 4 
"/home/snake/swirl.jpg")' '(gimp-quit)' 

The \"" 's are too make sure the command gets "swirl.jpg" and not just swirl.jpg.

NOTE: The script is actually called with '-' 's in the name and not the '_' 's that are actually in the name defined in script-fu. Yes, this is weird. Even weirder, the PDB name has the '-' . Why? I have no idea.

The '(gimp-quit)' shuts down gimp after running the script.


Next Previous Contents