Attachment | Size |
---|---|
golden_label.py | 17.43 KB |
dialog.png | 22.35 KB |
MrMrsInnocentFamily.png | 369.87 KB |
return_label.png | 78.53 KB |
golden_label26.py.txt | 18.55 KB |
This python plugin reads names and addresses from a MySQL database and creates golden mailing labels (with optional return label).
I created this script out of the desire to have golden text on my wedding invitation and save the date envelopes. I may have taken this too far :-)
WARNING: Some understanding of SQL required.
Screen shots & Examples added (03-18-08)
The completed envelope(s) are either displayed or exported to a png or jpeg file. I found windows preview far more capable of printing than the GIMP (sorry everybody).
Unfortunately, while this works for me, it may need some tweaks to work for you.
What you will need:
- A working gimp/python setup (I've tested this only under windows XP so far)
- You will need the MySQLdb python module
- a MySQL server with the data you need: name, street1, street2, city, state, zip (street1 is the first line of the address, street2 is the second line).
- a golden environment map, see the tutorial at http://www.gimp.org/tutorials/Golden_Text/ for instructions and an example. It's hard to say that my script makes golden labels. Without a good envmap, it doesn't make anything at all worthwhile. I was reluctant to code up the creation of a golden envmap as part of the script because having it in there would remove control of the final product. Once you have an envmap, you may need to rotate it to tweak the brightness and shading to make things look right.
To make the return label I started up the python console (a wonderfully useful plugin) and imported the following script:
import gimpfu
gimpfu.debug_environment = True
from gimpfu import *
import sys
sys.path.append("C:\\Documents and Settings\\Andy\\.gimp-2.4\\plug-ins")
I then imported "golden_label" which was located in the path listed above. I then called the "golden" function with the appropriate arguments, thus bypassing the MySQL code entirely.
Feel free to edit and redistribute as you see fit (GPLv2+).
Any questions please feel free to send me an email (gmail) at: ajzobro
Update (03-19-10) to work with Gimp 2.6. Untested, however, as the database connection and original envmap are no longer readily available (hard drive crash).
Recent comments