Difference between revisions of "User:Tsingi"

From Inkscape Wiki
Jump to navigation Jump to search
 
(21 intermediate revisions by the same user not shown)
Line 3: Line 3:
* Wiki profiler page: [http://wiki.inkscape.org/wiki/index.php/Save_Cleaned_SVG#Cleaning_Operations Save_Cleaned_SVG]
* Wiki profiler page: [http://wiki.inkscape.org/wiki/index.php/Save_Cleaned_SVG#Cleaning_Operations Save_Cleaned_SVG]
* islint at [http://islint.sourceforge.net/ SourceForge]
* islint at [http://islint.sourceforge.net/ SourceForge]
* [http://wiki.inkscape.org/wiki/index.php/Islint islint requirements] note on this wiki


My motives are purely selfish.  I'm one of the authors of SVG, I work with SVG, and I find InkScape to be an excellent tool, but I spend a lot of time editing InkScape output with vi to clean it up for use in dynamic web apps (mostly).  A task with very low entertainment value.  Writing filters is more fun.
My motives are purely selfish.  I'm one of the authors of SVG, I work with SVG, and I find InkScape to be an excellent tool, but I spend a lot of time editing InkScape output with vi to clean it up for use in dynamic web apps (mostly).  A task with very low entertainment value.  Writing filters is more fun.


islint is pretty useful to me as is now, it has a way to go before it will serve as a general filter for InkScape.
islint is pretty useful to me as is now, it has a way to go before it will serve as a general filter for InkScape.
This is the wrong place to do this, but it will serve for now...
= islint =
=== Wiki Notes Annotated ===
'''''In italics is a copy of the '''Cleaning Operations''' list from the [http://wiki.inkscape.org/wiki/index.php/Save_Cleaned_SVG Save_Cleaned_SVG] page'''''
My notes are formatted like this.
* '''''Specify a limit to the precision of all positional elements.'''''
'''DONE''' trimming precision was my first priority.  precision can be set to -1 (off) or 0..9.  islint gives an extra decimal to transformation floats, so if you set prec=1, a matrix will have values to two decimal places.  This is to preserve a little sanity at a low cost should there be nested transforms.
* '''''Clean up XML Elements'''''
** '''''Collapse multiple redundant groups'''''
'''Not done, easy, Low priority'''.
** '''''Remove empty tags, such as defs or metadata.'''''
'''Not done, easy, Low priority'''.
** '''''Remove id tags for elements not referenced'''''
'''Not done, easy''' I like to have an id on everything.  I usually want something more useful than path1234, but that requires either human intervention, or a targeted generator.  I can add it as an option, '''low priority'''
* '''''Clean up Definitions'''''
'''Not done, moderate, low priority''' Generally I think this section needs a bit of work.  I don't use InkScape for gradients at all, but I could.  InkScape creates a lot of gradients and creates and references linear gradients when it needs a radial gradient.  It should be possible to do a lot of cleanup here.
** '''''Remove unused definitions'''''
** '''''Remove duplicate gradient stops'''''
** '''''Collapse duplicate gradient definitions'''''
** '''''Remove gradients that are only referenced by one other gradient'''''
* '''''Clean up CSS'''''
** '''''Remove Default values, i.e. opacity: 1;'''''
** '''''Remove Not applicable  values, i.e. opacity: 0; fill-color: #00000;'''''
** '''''Convert RGB colours from RGB(r,g,b) to #RRGGBB format'''''
** '''''Convert RGB colours from #RRGGBB to #RGB if possible'''''
* '''''Clean up paths'''''
** '''''Detect vertical/horizontal lines and replace.'''''
** '''''Eliminate empty path segments'''''
** '''''Eliminate last segment in a polygon'''''
** '''''Collapse straight curves.'''''
** '''''Convert absolute path segments to relative ones.'''''
* '''''Process Transformations'''''
** '''''Process quadratic Bezier curves'''''
** '''''Collapse all group based transformations'''''
* '''''Convert known properties to element attributes'''''
** '''''css to element attributes'''''
* '''''Output Standard SVG'''''
** '''''Remove inkscape namespace'''''
** '''''Remove sodipodi namespace'''''
** '''''Remove adobe namespace'''''
** '''''Use viewPort instead of document width/height'''''

Latest revision as of 12:35, 24 September 2009

I've started contributing to InkScape in my own way, I have made a dent on a filter to sanitize InkScape.

My motives are purely selfish. I'm one of the authors of SVG, I work with SVG, and I find InkScape to be an excellent tool, but I spend a lot of time editing InkScape output with vi to clean it up for use in dynamic web apps (mostly). A task with very low entertainment value. Writing filters is more fun.

islint is pretty useful to me as is now, it has a way to go before it will serve as a general filter for InkScape.