paul@3 | 1 | Basic Usage
|
paul@3 | 2 | -----------
|
paul@3 | 3 |
|
paul@3 | 4 | Embed a visualization of a graph in a wiki page:
|
paul@3 | 5 |
|
paul@3 | 6 | {{{#!graphviz
|
paul@3 | 7 | digraph G {
|
paul@3 | 8 | A -> B;
|
paul@3 | 9 | };
|
paul@3 | 10 | }}}
|
paul@3 | 11 |
|
paul@3 | 12 | Advanced Usage
|
paul@3 | 13 | --------------
|
paul@3 | 14 |
|
paul@3 | 15 | This parser will check the first lines of the Graphviz data for C++ style
|
paul@3 | 16 | comments instructing it to use a different filter (dot, neato, twopi, circo,
|
paul@3 | 17 | or fdp - see http://graphviz.org/ for more info), use a different format for
|
paul@3 | 18 | the output (see the FORMATS list in the Parser class), or to generate and pass
|
paul@3 | 19 | a client-side image map.
|
paul@3 | 20 |
|
paul@3 | 21 | Options:
|
paul@3 | 22 |
|
paul@3 | 23 | filter - the filter to use (see Parser.FILTERS)
|
paul@3 | 24 | format - the output format (see Parser.FORMATS)
|
paul@3 | 25 | cmapx - the map name to use for the client-side image map; this must match
|
paul@3 | 26 | the graph name in the graph definition and shouldn't conflict with
|
paul@3 | 27 | any other graphs that are used on the same page; for SVG images, the
|
paul@3 | 28 | cmapx option is superfluous since SVG supports linking natively and
|
paul@3 | 29 | Graphviz converts "href" attributes appropriately
|
paul@3 | 30 |
|
paul@3 | 31 | Embed a visualization of a graph in a wiki page, using the dot filter and
|
paul@3 | 32 | providing a client-side image map (the filter=dot and format=png options are
|
paul@3 | 33 | redundant since those are the defaults for this parser):
|
paul@3 | 34 |
|
paul@3 | 35 | {{{#!graphviz
|
paul@3 | 36 | //filter=dot
|
paul@3 | 37 | //format=png
|
paul@3 | 38 | //cmapx=DocumentationMap
|
paul@3 | 39 | digraph DocumentationMap {
|
paul@3 | 40 | FrontPage [href="FrontPage", root=true];
|
paul@3 | 41 | HelpOnEditing [href="HelpOnEditing"];
|
paul@3 | 42 | SyntaxReference [href="SyntaxReference"];
|
paul@3 | 43 | WikiSandBox [href="WikiSandBox", color="grey"];
|
paul@3 | 44 | MoinMoin [href="http://moinmo.in"];
|
paul@3 | 45 | FrontPage -> WikiSandBox;
|
paul@3 | 46 | FrontPage -> MoinMoin;
|
paul@3 | 47 | WikiSandBox -> HelpOnEditing;
|
paul@3 | 48 | WikiSandBox -> SyntaxReference;
|
paul@3 | 49 | SyntaxReference -> FrontPage;
|
paul@3 | 50 | };
|
paul@3 | 51 | }}}
|
paul@3 | 52 |
|
paul@3 | 53 | Known Bugs
|
paul@3 | 54 | ----------
|
paul@3 | 55 |
|
paul@3 | 56 | - Hasn't been thoroughly checked for potential methods of injecting
|
paul@3 | 57 | arbitrary HTML into the output.
|
paul@3 | 58 | - Only compatible with HTML rendering
|
paul@3 | 59 | - May not use all of the MoinMoin interfaces properly - this is a
|
paul@3 | 60 | quick hack based on looking at an example and digging through the
|
paul@3 | 61 | MoinMoin source. The MoinMoin development docs haven't been
|
paul@3 | 62 | consulted (yet).
|
paul@3 | 63 | - Comments must start at the beginning of the graphviz block, and at the
|
paul@3 | 64 | beginning of their respective lines. They must also not contain
|
paul@3 | 65 | any extra whitespace surrounding the = sign.
|