Starting on version 0.10, minor comment cleanup

This commit is contained in:
JSCHILL1 2009-04-25 02:33:13 -05:00
parent 9f38caabaa
commit 12ba6000ea
4 changed files with 13 additions and 39 deletions

View file

@ -1,23 +0,0 @@
Scour
=====
Scour is a Python module that takes an input SVG and outputs a cleaner,
more concise SVG file. The goal is that authors will use this script after
editing the file in a GUI editor such as Inkscape or Adobe Illustrator.
Scour was started as a vehicle for me to learn Python. In addition, the goal
is to reduce the amount of time I spend in cleaning up files I find on sites
such as openclipart.org
Ideas are pulled from three places:
- my head
- Sam Ruby's SVG Tidy script: http://intertwingly.net/code/svgtidy/svgtidy.rb
- Inkscape's proposal for a 'cleaned SVG': http://wiki.inkscape.org/wiki/index.php/Save_Cleaned_SVG
Regards,
Jeff Schiller
2009-04-06
codedread@gmail.com
http://blog.codedread.com/

View file

@ -1,4 +1,4 @@
#!/bin/bash
SCOURVER="0.09"
tar cvf scour-$SCOURVER.tar scour.py LICENSE NOTICE README.txt
SCOURVER="0.10"
tar cvf scour-$SCOURVER.tar scour.py LICENSE NOTICE README.txt release-notes.html
gzip scour-$SCOURVER.tar

View file

@ -5,9 +5,13 @@
</head>
<body>
<h1>Scour Release Notes</h1>
<p>Copyright 2009, Jeff Schiller</p>
<section id="0.09">
<header>
<h3><a href="#0.09">Version 0.09</a></h3>
<h2><a href="#0.09">Version 0.09</a></h2>
</header>
<ul>
@ -22,7 +26,7 @@
<section id="0.08">
<header>
<h3><a href="#0.08">Version 0.08</a></h3>
<h2><a href="#0.08">Version 0.08</a></h2>
</header>
<ul>
@ -35,7 +39,7 @@
<section id="0.07">
<header>
<h3><a href="#0.07">Version 0.07</a></h3>
<h2><a href="#0.07">Version 0.07</a></h2>
</header>
<ul>
@ -48,7 +52,7 @@
<section id="0.06">
<header>
<h3><a href="#0.06">Version 0.06</a></h3>
<h2><a href="#0.06">Version 0.06</a></h2>
</header>
<ul>
@ -60,7 +64,7 @@
<section id="0.05">
<header>
<h3><a href="#0.05">Version 0.05 and earlier</a></h3>
<h2><a href="#0.05">Version 0.05 and earlier</a></h2>
</header>
<ul>

View file

@ -1,7 +1,6 @@
#!/usr/bin/env python
# Scour
# Version 0.09
#
# Copyright 2009 Jeff Schiller
#
@ -47,11 +46,6 @@
# * Put id attributes first in the serialization (or make the d attribute last)
# Next Up:
# + 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 attribute
# - Remove unnecessary units of precision on attributes
# - Remove unnecessary units of precision on path coordinates
# - Convert all colors to #RRGGBB format
@ -82,7 +76,7 @@ import os.path
import urllib
APP = 'scour'
VER = '0.09'
VER = '0.10'
COPYRIGHT = 'Copyright Jeff Schiller, 2009'
NS = { 'SVG': 'http://www.w3.org/2000/svg',
@ -895,6 +889,5 @@ if __name__ == '__main__':
print " Number of raster images embedded inline:", numRastersEmbedded
oldsize = os.path.getsize(input.name)
newsize = os.path.getsize(output.name)
#sizediff = (min(oldsize, newsize) / max(oldsize, newsize)) * 100;
sizediff = (newsize / oldsize);
t sizediff = (newsize / oldsize);
print " Original file size:", oldsize, "bytes; new file size:", newsize, "bytes (" + str(sizediff)[:5] + "x)"