From dae6f8bc7f695949560f0ae37c783a9cd91f1b50 Mon Sep 17 00:00:00 2001 From: jeff_schiller Date: Thu, 10 Sep 2009 12:30:13 +0000 Subject: [PATCH] Update to scour 0.20 extension --- share/extensions/scour.inx | 1 + share/extensions/scour.py | 150 ++++++++++++++++++++++++---------- share/extensions/yocto_css.py | 72 ++++++++++++++++ 3 files changed, 179 insertions(+), 44 deletions(-) create mode 100644 share/extensions/yocto_css.py diff --git a/share/extensions/scour.inx b/share/extensions/scour.inx index 4a435f639..57884b6aa 100644 --- a/share/extensions/scour.inx +++ b/share/extensions/scour.inx @@ -4,6 +4,7 @@ org.inkscape.output.scour scour.py svg_regex.py + yocto_css.py .svg image/svg+xml diff --git a/share/extensions/scour.py b/share/extensions/scour.py index e82df0bb6..d032bd696 100755 --- a/share/extensions/scour.py +++ b/share/extensions/scour.py @@ -32,26 +32,16 @@ # Even more ideas here: http://esw.w3.org/topic/SvgTidy # * analysis of path elements to see if rect can be used instead? (must also need to look # at rounded corners) -# * removal of unused attributes in groups: -# -# -# -# -# -# in this case, fill="blue" should be removed # Next Up: -# + analyze all children of a group, if they have common inheritable attributes, then move them to the group -# + scour lengths for *opacity, svg:x,y,width,height, stroke-miterlimit, stroke-width -# - analyze a group and its children, if a group's attribute is not being used by any children -# (or descendants?) then remove it +# + remove unused attributes in parent elements +# + prevent elements from being stripped if they are referenced in a