berteh/svg-objects-export

It seems that the SVG Export bug was finally fixed in Inkscape 0.93!

Emasoft opened this issue · 7 comments

It seems that the SVG Export bug was finally fixed in Inkscape 0.93! Now we can finally export individual elements by id, and with the viewBox resized and transformed to fit the icon?
https://bugs.launchpad.net/inkscape/+bug/1306662

Hi, I would like to try that but I can't find how to clone the 0.93 branch. Could you provide a link or a proper command ?

Go to this page (it is the page relative to the fix commit):
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/15218#src/verbs.cpp
And click on the "download tarball" option above.
Then you have to unpack and make the project for your OS platform (see: http://wiki.inkscape.org/wiki/index.php/Compiling_Inkscape )

Thanks, I'm having a bit of trouble building it and posted about it here, just to let you know in case you can be of any help.

I got help and could install it !
I followed the steps to reproduce the (now fixed) bug and it seems to work on any kind of shape and also on groups !
Now I guess we still need a script to batch export all groups with this new technique ?

Yes! All groups that are direct children of the root or of the group-layer. Maybe optionally filter by group id name (example: group id ending in "_svgicon")

Great to read compiling 0.93 went fine for you and that the bugfix is confirmed. Any pointer as to how you compiled it is welcome, and if you can share binaries that work for windows that would be just great.

To export all first level groups you can, for instance, use the following parameter:

--xpath "//svg:g[@inkscape:groupmode='layer']/svg:g"

Hope this helps.

Thanks, I will try this script. For compiling trunk on OpenSUSE, you can see this topic I linked earlier.