I have looked, but not found a topic that would shed light to my question. Have gone through Inkscape command line options, but I did not find the answer or was not able to grab it :)
So my question. Say I want to create a number of files (batch export) with same general design but with different text (person name 1, person name 2 etc.) that is (batch import from source file). Goal: Creating custom name stickers for club members and creating individually is time consuming.
So Ideally I would have 1) SVG file and 2) name list (CSV) and with the help of inkscape command line options would be able to :
- open SVG file
- populate existing text field with text from CSV file line 1
- export the file
- populate existing text field with text from CSV file line 2
-export the file
Repeat the cycle until source CSV file is done.
What do You think - doable or not worth the hassle?
Actually... an SVG file basically is a text file. The easiest way is to do this with a text editor :)
So you could create a script in Bash (linux), Python (whatever), powershell (Windows) or any language you understand.
Just try it out... create a simple SVG-file in Inkscape and put a specific piece of text in there. Then open the file in a text editor (notepad, notepadd++, gedit, etc...) and look for that piece of text.
You could even embed the svg into a HTML webpage, and dynamically change values. For example I created this page for a project at work:
Hello,
I have looked, but not found a topic that would shed light to my question. Have gone through Inkscape command line options, but I did not find the answer or was not able to grab it :)
So my question. Say I want to create a number of files (batch export) with same general design but with different text (person name 1, person name 2 etc.) that is (batch import from source file). Goal: Creating custom name stickers for club members and creating individually is time consuming.
So Ideally I would have 1) SVG file and 2) name list (CSV) and with the help of inkscape command line options would be able to :
- open SVG file
- populate existing text field with text from CSV file line 1
- export the file
- populate existing text field with text from CSV file line 2
-export the file
Repeat the cycle until source CSV file is done.
What do You think - doable or not worth the hassle?
Priit
Actually... an SVG file basically is a text file. The easiest way is to do this with a text editor :)
So you could create a script in Bash (linux), Python (whatever), powershell (Windows) or any language you understand.
Just try it out... create a simple SVG-file in Inkscape and put a specific piece of text in there. Then open the file in a text editor (notepad, notepadd++, gedit, etc...) and look for that piece of text.
You could even embed the svg into a HTML webpage, and dynamically change values. For example I created this page for a project at work:
https://assets.uitpas.be/templater/index.html