If there's an object-set-attribute action, it would make sense if there was object-get-attribute too. Why is that not the case and what alternative is there in bash?
I can use xmlstarlet like this, where text453 is my object's id and x is the attribute I want to query (the x position):
xmlstarlet sel -t -v "//*[@id='text453']/@x" drawing.svg
This also kind of answers my question of why there is no get-attribute action. Not only is there already this solution but xmlscarlet is near-instantaneous to run while an inkscape action takes several seconds, which would make it a very inefficient solution.
Thanks to inklinea for pointing me in the right direction.
If there's an
object-set-attribute
action, it would make sense if there wasobject-get-attribute
too. Why is that not the case and what alternative is there in bash?Found a way.
I can use xmlstarlet like this, where
text453
is my object's id andx
is the attribute I want to query (the x position):This also kind of answers my question of why there is no
get-attribute
action. Not only is there already this solution but xmlscarlet is near-instantaneous to run while an inkscape action takes several seconds, which would make it a very inefficient solution.Thanks to inklinea for pointing me in the right direction.