1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<_name>Optimized SVG Output</_name>
<id>org.inkscape.output.scour</id>
<dependency type="executable" location="extensions">scour.py</dependency>
<dependency type="executable" location="extensions">svg_regex.py</dependency>
<dependency type="executable" location="extensions">yocto_css.py</dependency>
<param name="tab" type="notebook">
<page name="Options" _gui-text="Options">
<param name="simplify-colors" type="boolean" _gui-text="Shorten color values">true</param>
<param name="style-to-xml" type="boolean" _gui-text="Convert CSS attributes to XML attributes">true</param>
<param name="group-collapsing" type="boolean" _gui-text="Group collapsing">true</param>
<param name="enable-id-stripping" type="boolean" _gui-text="Remove unused ID names for elements">false</param>
<param name="shorten-ids" type="boolean" _gui-text="Shorten IDs">false</param>
<param name="embed-rasters" type="boolean" _gui-text="Embed rasters">true</param>
<param name="keep-editor-data" type="boolean" _gui-text="Keep editor data">false</param>
<param name="remove-metadata" type="boolean" _gui-text="Remove metadata">false</param>
<param name="enable-comment-stripping" type="boolean" _gui-text="Remove comments">false</param>
<param name="enable-viewboxing" type="boolean" _gui-text="Enable viewboxing">false</param>
<param name="strip-xml-prolog" type="boolean" _gui-text="Remove the <?xml?> declaration">false</param>
<param name="set-precision" type="int" _gui-text="Number of significant digits for coords">5</param>
<param name="indent" type="enum" _gui-text="XML indentation (pretty-printing)">
<_item value="space">Space</_item>
<_item value="tab">Tab</_item>
<_item value="none">None</_item>
</param>
</page>
<page name="Help" _gui-text="Help">
<_param name="instructions" type="description" xml:space="preserve">This extension optimizes the SVG file according to the following options:
* Shorten color names: convert all colors to #RRGGBB or #RGB format.
* Convert CSS attributes to XML attributes: convert styles from <style> tags and inline style="" declarations into XML attributes.
* Remove unused ID names for elements: remove all unreferenced ID attributes.
* Shorten IDs: reduce the length of all ID attributes, assigning the shortest to the most-referenced elements. For instance, #linearGradient5621, referenced 100 times, can become #a.
* Embed rasters: embed raster images as base64-encoded data URLs.
* Keep editor data: don't remove Inkscape, Sodipodi or Adobe Illustrator elements and attributes.
* Remove metadata: remove <metadata> tags along with all the information in them, which may include license metadata, alternate versions for non-SVG-enabled browsers, etc.
* Remove comments: remove <!-- --> tags.
* Enable viewboxing: size image to 100%/100% and introduce a viewBox.
* Number of significant digits for coords: all coordinates are output with that number of significant digits. For example, if 3 is specified, the coordinate 3.5153 is output as 3.51 and the coordinate 471.55 is output as 472.
* XML indentation (pretty-printing): either None for no indentation, Space to use one space per nesting level, or Tab to use one tab per nesting level.</_param>
</page>
</param>
<output>
<extension>.svg</extension>
<mimetype>image/svg+xml</mimetype>
<_filetypename>Optimized SVG (*.svg)</_filetypename>
<_filetypetooltip>Scalable Vector Graphics</_filetypetooltip>
</output>
<script>
<command reldir="extensions" interpreter="python">scour.inkscape.py</command>
</script>
</inkscape-extension>
|