Difference between revisions of "User:Tsingi"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
I've started contributing to InkScape in my own way, I have made a dent on a filter to sanitize InkScape. | I've started contributing to InkScape in my own way, I have made a dent on a filter to sanitize InkScape. | ||
* Wiki profiler page: [http://wiki.inkscape.org/wiki/index.php/Save_Cleaned_SVG 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] | ||
My motives are purely selfish. I'm one of the authors of SVG, I work with SVG, and I find | 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 | 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... | This is the wrong place to do this, but it will serve for now... | ||
Line 14: | Line 14: | ||
=== Wiki Notes Annotated === | === Wiki Notes Annotated === | ||
This is a copy of the | ''This is a copy of the '''Cleaning Operations''' list from the [http://wiki.inkscape.org/wiki/index.php/Save_Cleaned_SVG Save_Cleaned_SVG] page'' | ||
* Specify a limit to the precision of all positional elements. | * ''Specify a limit to the precision of all positional elements.'' | ||
* Clean up XML Elements | * ''Clean up XML Elements'' | ||
** Collapse multiple redundant groups | ** ''Collapse multiple redundant groups'' | ||
** Remove empty tags, such as defs or metadata. | ** ''Remove empty tags, such as defs or metadata.'' | ||
** Remove id tags for elements not referenced | ** ''Remove id tags for elements not referenced'' | ||
* Clean up Definitions | * ''Clean up Definitions'' | ||
** Remove unused definitions | ** ''Remove unused definitions'' | ||
** Remove duplicate gradient stops | ** ''Remove duplicate gradient stops'' | ||
** Collapse duplicate gradient definitions | ** ''Collapse duplicate gradient definitions'' | ||
** Remove gradients that are only referenced by one other gradient | ** ''Remove gradients that are only referenced by one other gradient'' | ||
* Clean up CSS | * ''Clean up CSS'' | ||
** Remove Default values, i.e. opacity: 1; | ** ''Remove Default values, i.e. opacity: 1;'' | ||
** Remove Not applicable values, i.e. opacity: 0; fill-color: #00000; | ** ''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 RGB(r,g,b) to #RRGGBB format'' | ||
** Convert RGB colours from #RRGGBB to #RGB if possible | ** ''Convert RGB colours from #RRGGBB to #RGB if possible'' | ||
* Clean up paths | * ''Clean up paths'' | ||
** Detect vertical/horizontal lines and replace. | ** ''Detect vertical/horizontal lines and replace.'' | ||
** Eliminate empty path segments | ** ''Eliminate empty path segments'' | ||
** Eliminate last segment in a polygon | ** ''Eliminate last segment in a polygon'' | ||
** Collapse straight curves. | ** ''Collapse straight curves.'' | ||
** Convert absolute path segments to relative ones. | ** ''Convert absolute path segments to relative ones.'' | ||
* Process Transformations | * ''Process Transformations'' | ||
** Process quadratic Bezier curves | ** ''Process quadratic Bezier curves'' | ||
** Collapse all group based transformations | ** ''Collapse all group based transformations'' | ||
* Convert known properties to element attributes | * ''Convert known properties to element attributes'' | ||
** css to element attributes | ** ''css to element attributes'' | ||
* Output Standard SVG | * ''Output Standard SVG'' | ||
** Remove inkscape namespace | ** ''Remove inkscape namespace'' | ||
** Remove sodipodi namespace | ** ''Remove sodipodi namespace'' | ||
** Remove adobe namespace | ** ''Remove adobe namespace'' | ||
** Use viewPort instead of document width/height | ** ''Use viewPort instead of document width/height'' |
Revision as of 10:18, 24 September 2009
I've started contributing to InkScape in my own way, I have made a dent on a filter to sanitize InkScape.
- Wiki profiler page: Save_Cleaned_SVG
- islint at SourceForge
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.
This is the wrong place to do this, but it will serve for now...
islint
Wiki Notes Annotated
This is a copy of the Cleaning Operations list from the Save_Cleaned_SVG page
- Specify a limit to the precision of all positional elements.
- Clean up XML Elements
- Collapse multiple redundant groups
- Remove empty tags, such as defs or metadata.
- Remove id tags for elements not referenced
- Clean up Definitions
- 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