Hi all,
You might be interested in what I did with Inkscape, YAML, and a couple hundred lines of Pthon...
I teach a troubleshooting course, and a client asked for certificates of completion for all the client's students. So here's what I did:
I used Inkscape to make the certificate, complete with a nice triple-line border. Everywhere that needed something specific, such as venue (for example "ABC Corp in Indianapolis, IN"), I put @variablename@...95... Most of those variables, such as venue and date range, were per-course, but the student name was per-student.
I saved this Inscape file uncompressed for easy parsing. To drive the run, I used a YAML file something like what you see below my sig. I think if you look at the YAML file you can pretty much envision the Python program.
The Python program looped through the YAML graduates list, and for each one:
* For each key in tokens, replaced @tokenkey@ with the token's value in the Inscape file * Wrote the SVG result to an output file in run_info['output_dir'] * Converted that SVG file to a PDF
My client was delighted both with the quality of the result and the speed with which I did it.
Because of its native text format and its ability to do complex graphics, Inkscape provides the ideal bridge between data and graphics.
Thank you for giving us Inkscape.
SteveT
Steve Litt * http://www.troubleshooters.com/ Troubleshooting Training * Human Performance
############################################## run_info: template: 03_example_diploma.svg # MUST PUT SLASH AT END OF output_dir output_dir: ./finishedfiles/
tokens: company: Johnson Oil, Incorporated, office: Orlando, Florida daterange: March 12-13, 2013 signdate: March 15, 2013
graduates: - Alex Anderson - Brittany Baumgartner - Charles Custer - Dianna Donovan - Edward Ellsworth - Felice Fernandez ##############################################