Let's create a very simple script.
Where to write the script Place it in the location displayed in "Edit"-"Settings"-"Folders"-"Plugins". The version is 2.8
It seems that you can do it by registering with Gimp. Set variously in the argument of register method. Please refer to the document etc. for details.
#coding: UTF-8
from gimpfu import *
def plugin_main(timg, tdrawable):
pdb.gimp_message("TEST")
#Register with Gimp
register(
"python_fu_resize", #The name of the command when called from the command line or script
"", #Information about plugins displayed in the procedure browser
"", #Information about plugins displayed in the procedure browser
"o-kuhiiro", #Author's name
"o-kuhiiro", #Copyright holder's name
"2015", #Year of copyright
"<Image>/test.py", #Labels used for plugins in menus
"RGB*, GRAY*", #The type of image to be processed by the plugin
[], #argument
[], #Return value
plugin_main #Function name
)
main()
Open the appropriate image in Gimp. Then in the menu You will be able to execute it.
Also, you can start interactive mode with "Filter"-"Python-Fu"-"Console".
Recommended Posts