summaryrefslogtreecommitdiffstats
path: root/share/extensions/scour.inkscape.py
diff options
context:
space:
mode:
authorNicolas Dufour <nicoduf@yahoo.fr>2011-04-18 12:53:28 +0000
committerJazzyNico <nicoduf@yahoo.fr>2011-04-18 12:53:28 +0000
commitbd80c4e617ca468a3eeb6caefb9f7da38630c95c (patch)
treefbebf41cff6488a7c2ea952935fe9f54fc42c487 /share/extensions/scour.inkscape.py
parentRestore comment needed in *shared* code file. (diff)
downloadinkscape-bd80c4e617ca468a3eeb6caefb9f7da38630c95c.tar.gz
inkscape-bd80c4e617ca468a3eeb6caefb9f7da38630c95c.zip
Extensions. Optimized SVG export update (scour r210 + custom inx file).
(bzr r10180)
Diffstat (limited to 'share/extensions/scour.inkscape.py')
-rwxr-xr-xshare/extensions/scour.inkscape.py25
1 files changed, 24 insertions, 1 deletions
diff --git a/share/extensions/scour.inkscape.py b/share/extensions/scour.inkscape.py
index 69c2dda5d..1cc7744d9 100755
--- a/share/extensions/scour.inkscape.py
+++ b/share/extensions/scour.inkscape.py
@@ -19,15 +19,24 @@ class ScourInkscape (inkex.Effect):
self.OptionParser.add_option("--group-collapsing", type="inkbool",
action="store", dest="group_collapse", default=True,
help="won't collapse <g> elements")
+ self.OptionParser.add_option("--create-groups", type="inkbool",
+ action="store", dest="group_create", default=False,
+ help="create <g> elements for runs of elements with identical attributes")
self.OptionParser.add_option("--enable-id-stripping", type="inkbool",
action="store", dest="strip_ids", default=False,
help="remove all un-referenced ID attributes")
+ self.OptionParser.add_option("--shorten-ids", type="inkbool",
+ action="store", dest="shorten_ids", default=False,
+ help="shorten all ID attributes to the least number of letters possible")
self.OptionParser.add_option("--embed-rasters", type="inkbool",
action="store", dest="embed_rasters", default=True,
help="won't embed rasters as base64-encoded data")
self.OptionParser.add_option("--keep-editor-data", type="inkbool",
action="store", dest="keep_editor_data", default=False,
help="won't remove Inkscape, Sodipodi or Adobe Illustrator elements and attributes")
+ self.OptionParser.add_option("--remove-metadata", type="inkbool",
+ action="store", dest="remove_metadata", default=False,
+ help="remove <metadata> elements (which may contain license metadata etc.)")
self.OptionParser.add_option("--strip-xml-prolog", type="inkbool",
action="store", dest="strip_xml_prolog", default=False,
help="won't output the <?xml ?> prolog")
@@ -37,10 +46,24 @@ class ScourInkscape (inkex.Effect):
self.OptionParser.add_option("--indent",
action="store", type="string", dest="indent_type", default="space",
help="indentation of the output: none, space, tab (default: %default)")
+ self.OptionParser.add_option("--protect-ids-noninkscape", type="inkbool",
+ action="store", dest="protect_ids_noninkscape", default=False,
+ help="don't change IDs not ending with a digit")
+ self.OptionParser.add_option("--protect-ids-list",
+ action="store", type="string", dest="protect_ids_list", default=None,
+ help="don't change IDs given in a comma-separated list")
+ self.OptionParser.add_option("--protect-ids-prefix",
+ action="store", type="string", dest="protect_ids_prefix", default=None,
+ help="don't change IDs starting with the given prefix")
self.OptionParser.add_option("--enable-viewboxing", type="inkbool",
action="store", dest="enable_viewboxing", default=False,
help="changes document width/height to 100%/100% and creates viewbox coordinates")
-
+ self.OptionParser.add_option("--enable-comment-stripping", type="inkbool",
+ action="store", dest="strip_comments", default=False,
+ help="remove all <!-- --> comments")
+ self.OptionParser.add_option("--renderer-workaround", type="inkbool",
+ action="store", dest="renderer_workaround", default=False,
+ help="work around various renderer bugs (currently only librsvg)")
def effect(self):
input = file(self.args[0], "r")