Skip to content

Instantly share code, notes, and snippets.

@trinityhades
trinityhades / svgComponentExtractor.py
Last active November 4, 2025 20:44 — forked from revolunet/glyphes.py
Extract shapes from a single SVG to multiple files. good to create glyphes from a single file.
# -*- encoding: UTF-8 -*-
'''
SVG Element Extractor - Extract individual components from SVG files.
Based on github.com/revolunet/glyphes.py
Extracts all first-level elements (groups and paths) from an SVG file into separate,
properly scaled and centered SVG files. Automatically splits compound paths with
multiple M commands into individual elements.