Scour Release Notes
Copyright 2010, Jeff Schiller
- Fix Bug 541889 to parse polygon/polyline points missing whitespace/comma separating a negative value. Always output points attributes as comma-separated.
- Fix Bug 519698 to properly parse move commands that have line segments.
- Fix Bug 577940 to include stroke-dasharray into list of style properties turned into XML attributes.
- Fix Bug 562784, typo in Inkscape description
- Fix Bug 603988, do not commonize attributes if the element is referenced elsewhere.
- Fix Bug 604000, correctly remove default overflow attributes.
- Fix Bug 603994, fix parsing of <style> element contents when a CDATA is present
- Fix Bug 583758, added a bit to the Inkscape help text saying that groups aren't collapsed if IDs are also not stripped.
- Fix Bug 583458, another typo in the Inkscape help tab.
- Fix Bug 594930, In a <switch>, require one level of <g> if there was a <g> in the file already. Otherwise, only the first subelement of the <g> is chosen and rendered.
- Fix Bug 576958, "Viewbox option doesn't work when units are set", when renderer workarounds are disabled.
- Added many options: --remove-metadata, --quiet, --enable-comment-stripping, --shorten-ids, --renderer-workaround.
- Fix Bug 517064 to make XML well-formed again
- Fix Bug 503750 fix Inkscape extension to correctly pass --enable-viewboxing
- Fix Bug 511186 to allow comments outside of the root <svg> node
- Fix Bug 482215 by using os.linesep to end lines
- Fix unittests to run properly in Windows
- Removed default scaling of image to 100%/100% and creating a viewBox. Added --enable-viewboxing option to explicitly turn that on
- Fix Bug 503034 by only removing children of a group if the group itself has not been referenced anywhere else in the file
Nov 9th, 2009
- Fix Bug 449803 by ensuring input and output filenames differ.
- Fix Bug 453737 by updated Inkscape's scour extension with a UI
- Fix whitespace collapsing on non-textual elements that had xml:space="preserve"
- Fix Bug 479669 to handle empty <style> elements.
Sep 27th, 2009
- Fix Bug 427309 by updated Scour inkscape extension file to include yocto_css.py
- Fix Bug 435689 by properly preserving whitespace in XML serialization
- Fix Bug 436569 by getting xlink:href prefix correct with invalid SVG
Aug 31st, 2009
- Fix Bug 368716 by implementing a really tiny CSS parser to find out if any style element have rules referencing gradients, filters, etc
- Remove unused attributes from parent elements
- Fix a bug with polygon/polyline point parsing if there was whitespace at the end
Aug 13th, 2009
- Fix XML serialization bug: xmlns:XXX prefixes not preserved when not in default namespace
- Fix XML serialization bug: remapping to default namespace was not actually removing the old prefix
- Move common attributes to ancestor elements
- Fix Bug 412754: Elliptical arc commands must have comma/whitespace separating the coordinates
- Scour lengths for svg x,y,width,height,*opacity,stroke-width,stroke-miterlimit
Aug 9th, 2009
- Remove attributes of gradients if they contain default values
- Reduce bezier/quadratic (c/q) segments to their shorthand equivalents (s/t)
- Move to a custom XML serialization such that id/xml:id is printed first (Thanks to Richard Hutch for the suggestion)
- Added --indent option to specify indentation type (default='space', other options: 'none', 'tab')
Aug 3rd, 2009
- Only convert to #RRGGBB format if the color name will actually be shorter
- Remove duplicate gradients
- Remove empty q,a path segments
- Scour polyline coordinates just like path/polygon
- Scour lengths from most attributes
- Remove redundant SVG namespace declarations and prefixes
July 30th, 2009
- Fix Bug 401628: Keep namespace declarations when using --keep-editor-data (Thanks YoNoSoyTu!)
- Remove trailing zeros after decimal places for all path coordinates
- Use scientific notation in path coordinates if that representation is shorter
- Scour polygon coordinates just like path coordinates
- Add XML prolog to scour output to ensure valid XML, added --strip-xml-prolog option
July 5th, 2009
- added --keep-editor-data command-line option
- Fix Bug 395645: Keep all identified children inside a defs (Thanks Frederik!)
- Fix Bug 395647: Do not remove closepath (Z) path segments
June 10th, 2009
- Collapse adjacent commands of the same type
- Convert straight curves into line commands
- Eliminate last segment in a polygon
- Rework command-line argument parsing
- Fix bug in embedRasters() caused by new command-line parsing
- added --disable-embed-rasters command-line option
May 19th, 2009
- properly deal with fill="url("#foo")"
- properly handle paths with more than 1 pair of coordinates in the first Move command
- remove font/text styles from shape elements (font-weight, font-size, line-height, etc)
- remove -inkscape-font-specification styles
- added --set-precision argument to set the number of significant digits (defaults to 5 now)
- collapse consecutive h,v coords/segments that go in the same direction
May 17th, 2009
- upgraded enthought's path parser to handle scientific notation in path coordinates
- convert colors to #RRGGBB format
- added option to disable color conversion
April 28th, 2009
- convert gradient stop offsets from percentages to float
- convert gradient stop offsets to integers if possible (0 or 1)
- fix bug in line-to-hv conversion
- handle non-ASCII characters (Unicode)
- remove empty line or curve segments from path
- added option to prevent style-to-xml conversion
- handle compressed svg (svgz) on the input and output
- added total time taken to the report
- Removed XML pretty printing because of this problem.
April 27th, 2009
- Remove path with empty d attributes
- Sanitize path data (remove unnecessary whitespace)
- Convert from absolute to relative path data
- Remove trailing zeroes from path data
- Limit to no more than 6 digits of precision
- Remove empty line segments
- Convert lines to horiz/vertical line segments where possible
- Remove some more default styles (display:none, visibility:visible, overflow:visible,
April 25th, 2009
- Fix bug when removing stroke styles
- Remove gradients that are only referenced by one other gradient
- Added option to prevent group collapsing
- Prevent groups with title/desc children from being collapsed
- Remove stroke="none"
April 22nd, 2009
- Remove unnecessary nested <g> elements
- Remove duplicate gradient stops (same offset, stop-color, stop-opacity)
- Always keep fonts inside <defs>, always keep ids on fonts
- made ID stripping optional (disabled by default)
April 15th, 2009
- moved all functionality into a module level function named 'scour' and began adding unit tests
- prevent metadata from being removed if they contain only text nodes
- Remove unreferenced pattern and gradient elements outside of defs
- Removal of extra whitespace, pretty printing of XML
April 13th, 2009
- Prevent error when stroke-width property value has a unit
- Convert width/height into a viewBox where possible
- Convert all referenced rasters into base64 encoded URLs if the files can be found
April 7th, 2009
- Removes unreferenced elements in a <defs>
- Removes all inkscape, sodipodi, adobe elements
- Removes all inkscape, sodipodi, adobe attributes
- Remove all unused namespace declarations on the document element
- Removes any empty <defs>, <metadata>, or <g> elements
- Style fix-ups:
- Fixes any style properties like this:
style="fill: url(#linearGradient1000) rgb(0, 0, 0);"
- Removes any style property of:
- Removes any stroke properties when stroke=none or stroke-opacity=0 or stroke-width=0
- Removes any fill properties when fill=none or fill-opacity=0
- Removes all fill/stroke properties when opacity=0
- Removes any
- Removes any
- Removes any
- Convert style properties into SVG attributes