22 Jan
2013
22 Jan
'13
12:58 a.m.
Hi all,
Inscape plus Python plus PyYaml provides a powerful tool. What you can do is, in the Inkscape file, put @varname@ everywhere you want a substitution token. Then, in your YAML file, you do something like this:
template: name: Steve Litt date: 1/21/2013 city: Orlando, Florida
Then write a very simple nested loop that, upon encountering @name@, substitutes "Steve Litt". This can even be used to link a bitmap graphic into an Inkscape file.
The beauty of this is it's a very generic tool. All specifics are in the Inkscape template file and the YAML file, but the Python program itself is generic.
This technique could actually be used with any kind of template file, but of course this is the Inkscape mailing list.
SteveT