Need help with Python on GIMP 2.8 for bug fixing
This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
Need help with Python on GIMP 2.8 for bug fixing | bart@neeneenee.de | 02 Aug 18:33 |
Need help with Python on GIMP 2.8 for bug fixing | Ofnuts | 02 Aug 19:41 |
Need help with Python on GIMP 2.8 for bug fixing | Joao S. O. Bueno | 02 Aug 20:29 |
Need help with Python on GIMP 2.8 for bug fixing | bart@neeneenee.de | 03 Aug 09:04 |
Need help with Python on GIMP 2.8 for bug fixing | Ofnuts | 03 Aug 10:18 |
Need help with Python on GIMP 2.8 for bug fixing | bart@neeneenee.de | 03 Aug 17:33 |
Need help with Python on GIMP 2.8 for bug fixing | Michael Schumacher | 03 Aug 17:53 |
Need help with Python on GIMP 2.8 for bug fixing | bart@neeneenee.de | 03 Aug 18:19 |
Need help with Python on GIMP 2.8 for bug fixing
Dear GIMP devs,
i'm the author of "CMYK Tiff 2 PDF" which is an addon for GIMP and the
Seperate+ plugin.
My script is part of the plugin registry too.
But it seems it doesn't show up in GIMP 2.8./ Ubuntu.
I changed the pythin script registration to:
register(
"python-fu-cmyk-tiff-2-pdf",
"CMYK Tiff 2 PDF",
"CMYK Tiff 2 PDF 20130802\nCreating a CMYK PDF for prepress from a
CMYK Tiff image.",
"Eckhard M. Jaeger, http://my.opera.com/area42/blog/",
"GPL V2 License",
"2013",
"*",
"*",
[
(PF_FILENAME, "this_file1", _("CMYK Tiff Images"), ""),
(PF_FILENAME, "this_file2", _(" "), ""),
(PF_RADIO, "this_compress", _("Compression"), "0", (("JPEG 95%
Quality","0"), ("Zip Full Quality","2"), ("No Compression","4"))),
(PF_SPINNER, "this_dpi", _("Resolution (dpi)"), 300, (0,2400,50)),
(PF_TOGGLE, "delete_files", _("Delete Images\nafter PDF creation"), False),
(PF_TOGGLE, "start_viewer", _("Start PDF Viewer\nafter export"), True),
],
[],
python_fu_cmyk_tiff_2_pdf,
domain=("gimp20-python", gimp.locale_directory),
menu="/Image/Separate/"
)
main()
But i didn't get it running.
Any help or idea?
Need help with Python on GIMP 2.8 for bug fixing
On 08/02/2013 08:33 PM, bart@neeneenee.de wrote:
Dear GIMP devs,
i'm the author of "CMYK Tiff 2 PDF" which is an addon for GIMP and the Seperate+ plugin.
My script is part of the plugin registry too.But it seems it doesn't show up in GIMP 2.8./ Ubuntu.
I changed the pythin script registration to:
register( "python-fu-cmyk-tiff-2-pdf",
"CMYK Tiff 2 PDF",
"CMYK Tiff 2 PDF 20130802\nCreating a CMYK PDF for prepress from a CMYK Tiff image.",
"Eckhard M. Jaeger, http://my.opera.com/area42/blog/", "GPL V2 License",
"2013",
"*",
"*",
[
(PF_FILENAME, "this_file1", _("CMYK Tiff Images"), ""), (PF_FILENAME, "this_file2", _(" "), ""), (PF_RADIO, "this_compress", _("Compression"), "0", (("JPEG 95% Quality","0"), ("Zip Full Quality","2"), ("No Compression","4"))),
(PF_SPINNER, "this_dpi", _("Resolution (dpi)"), 300, (0,2400,50)),
(PF_TOGGLE, "delete_files", _("Delete Images\nafter PDF creation"), False),
(PF_TOGGLE, "start_viewer", _("Start PDF Viewer\nafter export"), True),
],
[],
python_fu_cmyk_tiff_2_pdf,
domain=("gimp20-python", gimp.locale_directory), menu="/Image/Separate/"
)
main()But i didn't get it running.
Any help or idea?
_______________________________________________
File "/home/me/.gimp-2.8/plug-ins/testreg.py", line 17, in (PF_FILENAME, "this_file1", _("CMYK Tiff Images"), ""), NameError: name '_' is not defined
Need help with Python on GIMP 2.8 for bug fixing
teh "_" is a call to be used when your plug-in is written with
multi-lingual support - either
write your plug-in copying the "_" related bits from another python
plug-in with localisation, or leave it apart for now - just put on the
beggining files of your plug-in something along:
_ = lambda x: x
This will give you a mockup translating function that will allow you to focus first on the development, and you can polish it to get i18n working later on.
js
-> wrote:
On 08/02/2013 08:33 PM, bart@neeneenee.de wrote:
Dear GIMP devs,
i'm the author of "CMYK Tiff 2 PDF" which is an addon for GIMP and the Seperate+ plugin.
My script is part of the plugin registry too.But it seems it doesn't show up in GIMP 2.8./ Ubuntu.
I changed the pythin script registration to:
register( "python-fu-cmyk-tiff-2-pdf",
"CMYK Tiff 2 PDF",
"CMYK Tiff 2 PDF 20130802\nCreating a CMYK PDF for prepress from a CMYK Tiff image.",
"Eckhard M. Jaeger, http://my.opera.com/area42/blog/", "GPL V2 License",
"2013",
"*",
"*",
[
(PF_FILENAME, "this_file1", _("CMYK Tiff Images"), ""), (PF_FILENAME, "this_file2", _(" "), ""), (PF_RADIO, "this_compress", _("Compression"), "0", (("JPEG 95% Quality","0"), ("Zip Full Quality","2"), ("No Compression","4"))),
(PF_SPINNER, "this_dpi", _("Resolution (dpi)"), 300, (0,2400,50)),
(PF_TOGGLE, "delete_files", _("Delete Images\nafter PDF creation"), False),
(PF_TOGGLE, "start_viewer", _("Start PDF Viewer\nafter export"), True),
],
[],
python_fu_cmyk_tiff_2_pdf,
domain=("gimp20-python", gimp.locale_directory), menu="/Image/Separate/"
)
main()But i didn't get it running.
Any help or idea?
_______________________________________________
File "/home/me/.gimp-2.8/plug-ins/testreg.py", line 17, in
(PF_FILENAME, "this_file1", _("CMYK Tiff Images"), ""), NameError: name '_' is not defined
_______________________________________________ gimp-developer-list mailing list
List address: gimp-developer-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
Need help with Python on GIMP 2.8 for bug fixing
Hi all,
thanks for the first hints but no way to get it working. My plugin
structure for testing is:
from gimpfu import * import os, string, sys import os.path
gettext.install("gimp20-python", gimp.locale_directory, unicode=True) def
python_fu_cmyk_tiff_2_pdf(active_image, active_layer, this_file1,
this_file2, this_compress, this_dpi, delete_files, start_viewer):
do_delete = 0 register( "python_fu_cmyk_tiff_2_pdf", "CMYK Tiff 2 PDF",
"CMYK Tiff 2 PDF 20130802\nCreating a CMYK PDF for prepress from a CMYK
Tiff image.", "Eckhard M. Jaeger, http://my.opera.com/area42/blog/", "GPL
V2 License", "2013", "*", "*", [ (PF_FILENAME, "this_file1", ("CMYK
Tiff Images"), ""), (PF_FILENAME, "this_file2", (" "), ""), (PF_RADIO,
"this_compress", ("Compression"), "0", (("JPEG 95% Quality","0"), ("Zip
Full Quality","2"), ("No Compression","4"))), (PF_SPINNER, "this_dpi",
("Resolution (dpi)"), 300, (0,2400,50)), (PF_TOGGLE, "delete_files",
("Delete Images\nafter PDF creation"), False), (PF_TOGGLE,
"start_viewer", ("Start PDF Viewer\nafter export"), True), ], [],
python_fu_cmyk_tiff_2_pdf, domain=("gimp20-python",
gimp.locale_directory), menu="/Image/Separate/" ) main() I didn't
get an eror on the python console nor the plugin showed up at menus or
python script listing :( Cheers Eckhard.
Need help with Python on GIMP 2.8 for bug fixing
On 08/03/2013 11:04 AM, bart@neeneenee.de wrote:
Hi all,
thanks for the first hints but no way to get it working. My plugin structure for testing is:
from gimpfu import * import os, string, sys import os.path gettext.install("gimp20-python", gimp.locale_directory, unicode=True) def
python_fu_cmyk_tiff_2_pdf(active_image, active_layer, this_file1, this_file2, this_compress, this_dpi, delete_files, start_viewer): do_delete = 0 register( "python_fu_cmyk_tiff_2_pdf", "CMYK Tiff 2 PDF",
"CMYK Tiff 2 PDF 20130802\nCreating a CMYK PDF for prepress from a CMYK Tiff image.", "Eckhard M. Jaeger, http://my.opera.com/area42/blog/", "GPL
V2 License", "2013", "*", "*", [ (PF_FILENAME, "this_file1", ("CMYK Tiff Images"), ""), (PF_FILENAME, "this_file2", (" "), ""), (PF_RADIO, "this_compress", ("Compression"), "0", (("JPEG 95% Quality","0"), ("Zip Full Quality","2"), ("No Compression","4"))), (PF_SPINNER, "this_dpi", ("Resolution (dpi)"), 300, (0,2400,50)), (PF_TOGGLE, "delete_files", ("Delete Images\nafter PDF creation"), False), (PF_TOGGLE, "start_viewer", ("Start PDF Viewer\nafter export"), True), ], [], python_fu_cmyk_tiff_2_pdf, domain=("gimp20-python", gimp.locale_directory), menu="/Image/Separate/" ) main() I didn't
get an eror on the python console nor the plugin showed up at menus or python script listing :( Cheers Eckhard. _______________________________________________
No way python is going to run this jumbled code...
You seem to be missing at least one "import gettext"...
PM me the full thing otherwise...
Need help with Python on GIMP 2.8 for bug fixing
Hi all,
thanks for all your help, at least it was very easy get it running. It seems that in GIMP 2.8.x Python script will initialized if they are located at the "plug-ins" directory and not at the "scripts" directory.
Seems the "gimp-plugin-registry" package made this error.
Best regards Eckhard.
BTW: There is no up-to-date documentation about Python in GIMP 2.8 right?
Zitat von Ofnuts :
On 08/03/2013 11:04 AM, bart@neeneenee.de wrote:
Hi all,
thanks for the first hints but no way to get it working. My plugin structure for testing is:
from gimpfu import * import os, string, sys import os.path gettext.install("gimp20-python", gimp.locale_directory, unicode=True) def python_fu_cmyk_tiff_2_pdf(active_image, active_layer, this_file1, this_file2, this_compress, this_dpi, delete_files, start_viewer): do_delete = 0 register( "python_fu_cmyk_tiff_2_pdf", "CMYK Tiff 2 PDF", "CMYK Tiff 2 PDF 20130802\nCreating a CMYK PDF for prepress from a CMYK Tiff image.", "Eckhard M. Jaeger, http://my.opera.com/area42/blog/", "GPL V2 License", "2013", "*", "*", [ (PF_FILENAME, "this_file1", ("CMYK Tiff Images"), ""), (PF_FILENAME, "this_file2", (" "), ""), (PF_RADIO, "this_compress", ("Compression"), "0", (("JPEG 95% Quality","0"), ("Zip Full Quality","2"), ("No Compression","4"))), (PF_SPINNER, "this_dpi", ("Resolution (dpi)"), 300, (0,2400,50)), (PF_TOGGLE, "delete_files", ("Delete Images\nafter PDF creation"), False), (PF_TOGGLE, "start_viewer", ("Start PDF Viewer\nafter export"), True), ], [], python_fu_cmyk_tiff_2_pdf, domain=("gimp20-python", gimp.locale_directory), menu="/Image/Separate/" ) main() I didn't get an eror on the python console nor the plugin showed up at menus or python script listing :( Cheers Eckhard. _______________________________________________No way python is going to run this jumbled code...
You seem to be missing at least one "import gettext"...
PM me the full thing otherwise...
_______________________________________________ gimp-developer-list mailing list
List address: gimp-developer-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
Need help with Python on GIMP 2.8 for bug fixing
On 03.08.2013 19:33, bart@neeneenee.de wrote:
Hi all,
thanks for all your help, at least it was very easy get it running. It seems that in GIMP 2.8.x Python script will initialized if they are located at the "plug-ins" directory and not at the "scripts" directory.
They were always supposed to be there, previous versions of GIMP are no different in that regard.
Regards, Michael
Need help with Python on GIMP 2.8 for bug fixing
Hi Michael,
i droped a line to the package maintainer of the Debian package "gimp-plugin-registry" to fix it.
Best regards Eckhard.
Zitat von Michael Schumacher :
On 03.08.2013 19:33, bart@neeneenee.de wrote:
Hi all,
thanks for all your help, at least it was very easy get it running. It seems that in GIMP 2.8.x Python script will initialized if they are located at the "plug-ins" directory and not at the "scripts" directory.
They were always supposed to be there, previous versions of GIMP are no different in that regard.
--
Regards,
Michael
_______________________________________________ gimp-developer-list mailing list
List address: gimp-developer-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list