# HG changeset patch # User Paul Boddie # Date 1446416971 -3600 # Node ID 9b0ed0685bd753ea1c26f1b3b98c7ffc12f6455e # Parent 2e2fcefcc5ae87bfee9529991b2b5bcef93b679c Updated the documentation, adding details of SVG transformation support, also providing a copy of the notugly.xsl stylesheet for convenience. diff -r 2e2fcefcc5ae -r 9b0ed0685bd7 README.txt --- a/README.txt Tue May 27 23:43:55 2014 +0200 +++ b/README.txt Sun Nov 01 23:29:31 2015 +0100 @@ -40,13 +40,19 @@ Options: -filter - the filter to use (see Parser.FILTERS) -format - the output format (see Parser.OUTPUT_FORMATS) -cmapx - the map name to use for the client-side imagemap; this must match - the graph name in the graph definition and shouldn't conflict with - any other graphs that are used on the same page; for SVG images, the - cmapx option is superfluous since SVG supports linking natively and - Graphviz converts "href" attributes appropriately +filter - the filter to use (see Parser.FILTERS) +format - the output format (see Parser.OUTPUT_FORMATS) +cmapx - the map name to use for the client-side imagemap; this must match + the graph name in the graph definition and shouldn't conflict with + any other graphs that are used on the same page; for SVG images, + the cmapx option is superfluous since SVG supports linking + natively and Graphviz converts "href" attributes appropriately +transform - the name of a transformation applied to SVG output; this must + match an entry in the TRANSFORMS dictionary defined in the Parser + class; by default, only "notugly" is supported, for which the + DIAGRAM_TOOLS_PATH must be defined appropriately in the parser + file, referencing the directory containing the notugly.xsl file; + other transformations may be added as required To embed a visualisation of a graph in a Wiki page, using the dot filter and providing a client-side imagemap (the filter=dot and format=png options are @@ -128,6 +134,14 @@ graphviz Tested with 2.16 Source: http://www.graphviz.org/ +SVG output can be transformed using XSL transformations, and the parser can +make use of the diagram-tools notugly.xsl stylesheet to improve the appearance +of graphs. See the resources directory for a copy of this stylesheet provided +for convenience. The repository for diagram-tools can be found at the +following location: + +https://github.com/vidarh/diagram-tools.git + Contact, Copyright and Licence Information ------------------------------------------ @@ -143,6 +157,12 @@ Copyright and licence information can be found in the docs directory - see docs/COPYING.txt and docs/LICENCE.txt for more information. +New in GraphvizParser 0.3 (Changes since GraphvizParser 0.2.3) +-------------------------------------------------------------- + + * Added some support for XSL transformations to the Graphviz SVG output. + * Added close_fds usage for XSLT processor subprocesses. + New in GraphvizParser 0.2.3 (Changes since GraphvizParser 0.2.2) ---------------------------------------------------------------- diff -r 2e2fcefcc5ae -r 9b0ed0685bd7 docs/COPYING.txt --- a/docs/COPYING.txt Tue May 27 23:43:55 2014 +0200 +++ b/docs/COPYING.txt Sun Nov 01 23:29:31 2015 +0100 @@ -2,7 +2,7 @@ ----------------- Copyright (C) 2008 Wayne Tucker -Copyright (C) 2011, 2012 Paul Boddie +Copyright (C) 2011, 2012, 2013, 2014, 2015 Paul Boddie Copyright (C) 2012 Frederick Capovilla (Libéo) This software is free software; you can redistribute it and/or @@ -19,3 +19,26 @@ License along with this library; see the file LICENCE.txt If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Licence for the notugly.xsl Stylesheet +-------------------------------------- + +Copyright (c) 2012 Vidar Hokstad + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff -r 2e2fcefcc5ae -r 9b0ed0685bd7 parsers/graphviz.py --- a/parsers/graphviz.py Tue May 27 23:43:55 2014 +0200 +++ b/parsers/graphviz.py Sun Nov 01 23:29:31 2015 +0100 @@ -4,12 +4,12 @@ Based loosely on GNUPLOT parser by MoinMoin:KwonChanYoung @copyright: 2008 Wayne Tucker - @copyright: 2011, 2012, 2013, 2014 Paul Boddie + @copyright: 2011, 2012, 2013, 2014, 2015 Paul Boddie @copyright: 2012 Frederick Capovilla (Libéo) @license: GNU GPL, see COPYING for details. """ -__version__ = "0.2.4" +__version__ = "0.3" # Change this to the directory that the Graphviz binaries (dot, neato, etc.) # are installed in. diff -r 2e2fcefcc5ae -r 9b0ed0685bd7 resources/notugly.xsl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/resources/notugly.xsl Sun Nov 01 23:29:31 2015 +0100 @@ -0,0 +1,613 @@ + + + + +font-size:10px; font-family:sans-serif; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fill- + + + stop-color:;stop-opacity:1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + shadow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + black + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fill: black; stroke: none; fill-opacity:0.3 + translate(3,3) + + + + + + + fill: none; stroke: black; stroke-opacity:0.3 + translate(3,3) + + + + + + + + + + + + + + + + + + + + + + + + black + + + + + + + + + + + + + + + + + + + + + + + + + + fill: url(#); + + + fill: none; + + + stroke: ; + stroke: ; + stroke: black; + + + + + + + + fill: url(#fill-); + fill: url(#); + + + +