02-11-2023, 03:40 PM
The above was the answer to a question I found in reddit thanks to a similar quest of mine. I'm set out to do just that, and my lackings on Python programming are very nicely being covered by ChatGPT.
I have text layers in an xcf file with descriptive names and at this point, all I want to do is replace the text in them programmatically from a python script..
Chat GPT has already come up with some python code but it's throwing up a crucial error right at the beginning:
Code:
import gimpfu
line 1, in <module> import gimpfu ModuleNotFoundError: No module named 'gimpfu'
Then Chat GPT suggested this:
Code:
import sys
sys.path.append("/usr/lib/gimp/2.0/python")
import gimpfu
Same error pretty much:
line 3, in <module> import gimpfu ModuleNotFoundError: No module named 'gimpfu'
Chat GPT suggested to find the location for gimpfu.py
Code:
find / -name gimpfu.py 2>/dev/null
That rendered nothing in my terminal. I'm on bullseye, MX Linux, and GIMP is installed from the repository. I can reinstall should that be the suggestion. I'm on GIMP 2.10.28
Any ideas as to how to go about this? Are there any sample files that could show the editing of an existing text laxer? But then, How can I get python to import the library that talks to the GIMPs API?