PSSVG would be much more useful if it could easily convert any SVG off of the internet into a PSSVG file.
So, as of PSSVG 0.2.4, you can ConvertTo-PSSVG
ConvertTo-PSSVG takes an SVG from a file, url, string, or xml document and converts it into a PSSVG script.
For example, if I download the feather icon for anchor and then run
ConvertTo-PSSVG Anchor.svg
It will output:
=<SVG> -width '24' -height '24' -viewBox '0 0 24 24' -fill 'none' -stroke 'currentColor' -strokewidth '2' -strokelinecap 'round' -strokelinejoin 'round' -class 'feather feather-anchor' -Content @(
=<SVG.circle> -cx '12' -cy '5' -r '3'
=<SVG.line> -x1 '12' -y1 '22' -x2 '12' -y2 '8'
=<SVG.path> -d 'M5 12H2a10 10 0 0 0 20 0h-3'
)
This is actually fairly trivial.
First we get the XML form of the input, then we:
For bonus points, we indent.
Being able to ConvertTo-PSSVG gives you an easy way to integrate any existing design into your scripts. This can help, say, establish a visual leitmotif.
Hope this Helps