Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

HTML output contains the class name for easier reference

  • Loading branch information...
commit 1d36afd1c830cfac35b7fe6cf8341ac67cd10cf6 1 parent 1ff840f
@industria authored
Showing with 4 additions and 8 deletions.
  1. +2 −8 README
  2. +2 −0  spritify.py
View
10 README
@@ -24,11 +24,10 @@ This will generate a PNG names sprite.png containing the images packed into a sp
A lot of the default options can be adjustes using options to the script, which is shown by running the script with --help option. The options are shown below for quick reference:
python spritify.py --help
+
Usage: spritify.py [options] directory
-Create a sprint and a corresponding CSS file from images in the directory
-argument. If the directory isn't supplied the
-current directory will be used.
+Create a sprint and a corresponding CSS file from images in the directory argument. If the directory isn't supplied the current directory will be used.
Options:
--version show program's version number and exit
@@ -54,11 +53,6 @@ Options:
Name of the sprite file. (Default: sprite.png)
-
-
-
-
-
============
Testing sets
============
View
2  spritify.py
@@ -259,7 +259,9 @@ def _writeHtml(self, cssClasses):
html.write(str.format("<link rel=\"stylesheet\" type=\"text/css\" href=\"{0}\" />", self.__conf.cssfilename))
html.write("</head><body>")
for cssClass in cssClasses:
+ html.write(str.format("<div>{0} {1}</div>\n", self.__conf.cssClassname, cssClass))
html.write(str.format("<div class=\"{0} {1}\"></div>\n", self.__conf.cssClassname, cssClass))
+ html.write("<hr>\n")
html.write("""</body></html>""")
html.close()
Please sign in to comment.
Something went wrong with that request. Please try again.