Skip to content

Commit

Permalink
more README, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Oberstein committed Oct 26, 2013
1 parent 3f9f3a8 commit 44e5cb6
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

41 changes: 39 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,43 @@ To cleanup, do:

scons -uc

### Other builders
### SVGs, PNGs and GZipped versions

Write me.
Here is a more complete example `SConstruct` that show how to produce:

* Optimized SVGs
* PNGs from those
* GZipped versions of all

everything produced via a single command (`scons`):

SVG_FILES = ['myfigure.svg', 'awesome_shit1.svg', 'awesome_shit2.svg']

IMG_SOURCE_DIR = "design"
IMG_GEN_DIR = "gen"

import pkg_resources
taschenmesser = pkg_resources.resource_filename('taschenmesser', '..')

env = Environment(tools = ['default', 'taschenmesser'], toolpath = [taschenmesser])

for svg in SVG_FILES:
svgOpt = env.Scour("%s/%s" % (IMG_GEN_DIR, svg),
"%s/%s" % (IMG_SOURCE_DIR, svg),
SCOUR_OPTIONS = {'enable_viewboxing': True})

env.GZip("%s.gz" % svgOpt[0], svgOpt)

png = env.Svg2Png("%s.png" % os.path.splitext(str(svgOpt[0]))[0],
svgOpt,
SVG2PNG_OPTIONS = {})

env.GZip("%s.gz" % png[0], png)

### Amazon S3

Write me.

### Google Closure

Write me.

0 comments on commit 44e5cb6

Please sign in to comment.