Inkscape.org
Beyond the Basics action to get attribute?
  1. #1
    Chameleon Scales Chameleon Scales @Chameleon_Scales
    *

    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?

  2. #2
    Chameleon Scales Chameleon Scales @Chameleon_Scales
    *

    Found a way.

    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.