Inkscape.org
Beyond the Basics Get a text list of layers and elements
  1. #1
    Ken Ken @sandpiper
    *

    Is there any way to get a text list of layers and the elements on each layer?

    I would like to make a checklist of things to work on in a project. Is there a way to get the tree structure of the Layers window in text?

     

    I can see it in the XML editor. But, I cannot drag over the text to copy it. 

    I tried right-clicking on the file icon in Windows Explorer. There is an option to "Edit in Notepad". But, this shows all the graphical attributes of the objects. 

    I tried opening it in a browser and viewing at the Page Source. But, this shows the same graphical attributes. I just want what is shown in the Layers hierarchy. 

     

     

  2. #2
    inklinea inklinea @inklinea⛰️

    You mean just the tag with the id attribute ? 

    <svg xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" version="1.0" width="967.56842" height="1187.6506" id="svg2758" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="parrotframe-colour.svg">
      <metadata id="metadata229">
        <rdf:RDF>
          <cc:Work rdf:about="">
            <dc:format>image/svg+xml</dc:format>
            <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
            <dc:title/>
            <dc:creator>
              <cc:Agent>
                <dc:title>j4p4n</dc:title>
              </cc:Agent>
            </dc:creator>
            <cc:license rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/"/>
          </cc:Work>
          <cc:License rdf:about="http://creativecommons.org/publicdomain/zero/1.0/">
            <cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction"/>
            <cc:permits rdf:resource="http://creativecommons.org/ns#Distribution"/>
            <cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks"/>
          </cc:License>
        </rdf:RDF>
      </metadata>
      <sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1920" inkscape:window-height="978" id="namedview227" showgrid="false" inkscape:snap-global="false" inkscape:measure-start="110.024,961.881" inkscape:measure-end="420.093,1198.6" inkscape:zoom="0.33" inkscape:cx="506.06061" inkscape:cy="324.24242" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="1" inkscape:current-layer="svg2758" inkscape:showpageshadow="2" inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1"/>
      <defs id="defs2760">
        <pattern id="pattern2297"/>
        <pattern id="pattern1550">
          <g id="layer1-0">
            <g id="g987">
              <path id="path995"/>
              <path id="path993"/>
              <path id="path991"/>
              <path id="path989"/>
            </g>
            <g id="g949">
              <path id="path985"/>
              <path id="path983"/>
              <path id="path981"/>
              <path id="path979"/>
              <path id="path977"/>
              <path id="path975"/>
              <path id="path973"/>
              <path id="path971"/>
              <path id="path969"/>
              <path id="path967"/>
              <path id="path965"/>
              <path id="path963"/>
              <path id="path961"/>
              <path id="path959"/>
              <path id="path957"/>
              <path id="path955"/>
              <path id="path953"/>
              <path id="path951"/>
            </g>
          </g>
        </pattern>
      </defs>
      <g id="g2324">
        <g id="g2306">
          <path id="path231"/>
          <path id="path1045"/>
          <path id="path1047"/>
          <path id="path1043"/>
          <path id="path1041"/>
          <g id="layer1">
            <path id="path2818"/>
          </g>
        </g>
        <path id="path2308"/>
      </g>
    </svg>

    Parrotframe Colour
  3. #3
    Ken Ken @sandpiper
    *

    Thanks for the reply.

    If I open the XML file from Windows Explorer, I can see what you are posting, inklinea. But, I just want what is in the Layers tree structure. The XML Editor window inside Inkscape has fewer tags than the file. But, I cannot copy that text from that window inside Inkscape. 

    I did a little bit of searching. I discovered that MS Copilot can to OCR (optical character recognition). I was able to upload a screenshot of the Layers tree structure and get a list that I could copy.

     

     

    Copilot
  4. #4
    inklinea inklinea @inklinea⛰️

    If I work it out, will post here.

Inkscape Inkscape.org Inkscape Forum Beyond the Basics Get a text list of layers and elements