-
Notifications
You must be signed in to change notification settings - Fork 24
How to use
petercollingridge edited this page Feb 1, 2012
·
5 revisions
Requires Python 2.7
Example of use:
from cleanSVG import CleanSVG
svg = CleanSVG("test.svg") # Read file test.svg
svg.removeAttributes('id') # Remove all id attributes
svg.setDecimalPlaces(1) # Round numbers to 1 decimal place
svg.extractStyles() # Replace style attributes with CSS
svg.applyTransforms() # Apply transform attributes to coordinates
svg.write("cleaned-test.svg") # Output modified file test.svg