Ejemplo n.º 1
0
from cleanSVG import CleanSVG
import os

input_file = os.path.join("examples", "paths_test.svg")
output_file = "cleaned-test.svg"

svg = CleanSVG(input_file)
svg.removeAttribute('id')
svg.setDecimalPlaces(1)
svg.extractStyles()
svg.applyTransforms()
svg.write(output_file)
Ejemplo n.º 2
0
from cleanSVG import CleanSVG
import os

input_file = open("/Users/Tobsjoms/desktop/ground_floor.svg", "w")

#input_file = ("ground_floor.svg")
output_file = "test.svg"

svg = CleanSVG(input_file)
svg.removeAttribute('style')
svg.write(output_file)
Ejemplo n.º 3
0
from cleanSVG import CleanSVG
import os

input_file = os.path.join("examples", "paths_test.svg")
output_file = "cleaned-test.svg"

svg = CleanSVG(input_file)
svg.removeAttribute('id')
svg.setDecimalPlaces(1)
svg.extractStyles()
svg.removeElement('title')
svg.removeElement('desc')
svg.removeElement('defs')
svg.removeComments()
svg.applyTransforms()
svg.write(output_file)
Ejemplo n.º 4
0
# EFDVS-144
from cleanSVG import CleanSVG
import os
import sys
 
input_file = os.path.join(sys.argv[1])
output_file = sys.argv[1]
svg = CleanSVG(input_file)
svg.setDecimalPlaces(1)
svg.extractStyles()
svg.applyTransforms()
svg.write(output_file)