Scour - An SVG Optimizer / Cleaner
Find a file
Tobias Oberstein dccb80314c Merge pull request #37 from Eitot/sketch
Sketch support
2016-01-15 10:44:32 +01:00
scour - Initial support for Sketch 2015-12-24 17:07:40 +01:00
unittests Unittests: Add a test for proper decoding of ISO 8859-15 2015-12-09 21:32:18 +01:00
.gitignore initial source import (v0.26) and packaging 2013-10-22 16:31:42 +02:00
LICENSE initial source import (v0.26) and packaging 2013-10-22 16:31:42 +02:00
Makefile fix links; only upload source dist 2015-11-16 18:12:56 +01:00
README.md - Initial support for Sketch 2015-12-24 17:07:40 +01:00
scour.sublime-project initial source import (v0.26) and packaging 2013-10-22 16:31:42 +02:00
setup.py fix links; only upload source dist 2015-11-16 18:12:56 +01:00
testcss.py Unittests: Fix warnings 2015-12-06 22:13:21 +01:00
testscour.py Unittests: Add a test for proper decoding of ISO 8859-15 2015-12-09 21:32:18 +01:00

Scour

Scour is a Python module that takes an SVG file and produces a cleaner and more concise file. It is intended to be used after exporting with a GUI editor, such as Inkscape or Adobe Illustrator.

Requirements

  • Python 2.6 or later
  • six 1.9 or later
  • psyco (optional, Python 2.6 only)

Installation

Scour can be installed manually or with a package manager, such as pip or Homebrew. It is also included as an Inkscape extension and in some Linux distributions.

Manual installation

Download Scour and six and locate the setup.py file in both packages. Open a console and enter the following commands:

python /path/to/six/setup.py install
python /path/to/Scour/setup.py install

Do the same if you want to use psyco.

Package manager

To install Scour using pip, enter the following command into a console:

pip install scour

To do the same with Homebrew:

brew install scour

Using pip or Homebrew will install six automatically (Homebrew will also install Python, if not installed).

Usage

Standard:

scour -i input.svg -o output.svg

Better (for older versions of Internet Explorer):

scour -i input.svg -o output.svg --enable-viewboxing

Maximum scrubbing:

scour -i input.svg -o output.svg --enable-viewboxing --enable-id-stripping \
  --enable-comment-stripping --shorten-ids --indent=none

Maximum scrubbing and a compressed SVGZ file:

scour -i input.svg -o output.svgz --enable-viewboxing --enable-id-stripping \
  --enable-comment-stripping --shorten-ids --indent=none

License

Apache License 2.0

Development

Scour was originally developed by Jeff "codedread" Schiller and Louis Simard. Development is now maintained by Tobias "oberstet" Oberstein.

Scour was started as a vehicle for learning Python. In addition, the goal was to reduce the amount of time spent on cleaning up files that are found on sites such as openclipart.org.

Ideas were pulled from three places:

This Github repository is the official one. The official website as well as older packages can be found at www.codedread.com/scour.