From 04487ed1ecf15fa2827f77a8bcd67b874d0516bb Mon Sep 17 00:00:00 2001 From: JSCHILL1 Date: Wed, 5 Aug 2009 20:53:42 -0500 Subject: [PATCH] Ensure all consecutive commands are collapsed where possible --- scour.py | 45 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/scour.py b/scour.py index 44eff5c..eeb32b0 100755 --- a/scour.py +++ b/scour.py @@ -25,7 +25,6 @@ # (and implemented here: http://intertwingly.net/code/svgtidy/svgtidy.rb ) # Yet more ideas here: http://wiki.inkscape.org/wiki/index.php/Save_Cleaned_SVG -# TODO: Adapt this script into an Inkscape python plugin # # * Process Transformations # * Collapse all group based transformations @@ -59,12 +58,13 @@ # Next Up: # + Remove some attributes that have default values # + Convert c/q path segments into shorthand equivalents where possible: -# - add an option for svgweb compatible markup (no self-closing tags)? +# - parse transform attribute # - if a has only one element in it, collapse the (ensure transform, etc are carried down) # - remove id if it matches the Inkscape-style of IDs (also provide a switch to disable this) # - prevent elements from being stripped if they are referenced in a