Inkscape.org
Beyond the Basics Simplest way to convert SVGs into Symbols pack
  1. #1
    meetdilip meetdilip @meetdilip

    I have a set of icons from an icon pack. I wonder what is the simplest way to use them as symbols inside Inkscape. I am aware of adding them one by one to the " Current Document ". Other than that, is there any method available ? Thanks.

     

  2. #2
    inklinea inklinea @inklinea⛰️

    I don't know of any way to convert them separately in Inkscape gui. 

    If you have a single icon in a file ( so the icon pack is multiple svgs ) 

    This will convert the icon in the svg into a symbol.

    inkscape --batch-process --actions="EditSelectAllInAllLayers;ObjectsToSymbol;export-filename:icon_symbol.svg;export-do;" icon.svg

    You could then use sed to find everything the in the file between ( and including ) the <symbol> ..... </symbol> tags, and append to a master file.

    Open in Inkscape then resave, should clean it up.

  3. #3
    meetdilip meetdilip @meetdilip

    Thanks. I wanted to use this method on Bootstrap icons to be used inside Inkscape. I will give it a try :)

Inkscape Inkscape.org Inkscape Forum Beyond the Basics Simplest way to convert SVGs into Symbols pack