Change text on svg file from command line

General discussions about Inkscape.
sportzcast
Posts: 1
Joined: Sat Nov 09, 2013 10:12 am

Change text on svg file from command line

Postby sportzcast » Sat Nov 09, 2013 10:16 am

I want to edit existing text on several fields of text and then save as a PNG file. Can this be done from the command line? If so can someone provide a command line example?

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Change text on svg file from command line

Postby v1nce » Sat Nov 09, 2013 8:30 pm

svg is nothing more than a text file so you can use classical tools (such as sed) to change the text
http://www.grymoire.com/Unix/Sed.html#uh-1

sed s/day/night/ <my.svg >myedited.svg
inkscape --export-png=myedited.png myedited.svg

sed (and other unix tools) has been porte to window, you'll find it @ http://unxutils.sourceforge.net/


Return to “General Discussions”