I really appreciate the concept behind Spritemapper and also see advantages in the "zero-dependency" approach, but in practice Spritemapper runs quite fragile and with unsatisfying results:
- For some strange reason, Spritemapper isn't capable of parsing a css statement like
background: transparent url('arrow-tiny.png') no-repeat;. It took me a while of tweaking to find out that the color word transparent causes SpriteMapper to ignore the following url statement.
- Spritemapper also failed to read some PNGs and skipped them, although they were produced using fairly common settings (PNG-ZIP) encoding.
My point: why not make cssutils (http://packages.python.org/cssutils) and PIL optional dependencies. I had good experiences parsing complex stylesheets with cssutils, and you can extract all linked images easily with cssutils.getUrls()
If a system lacks these two deps, SpriteMapper can still fall back to its internal, but more experimental CSS/PNG tools.