Installing the Graphviz Plugin

By installing this plugin you will be able to create graphs directly in Dokuwiki. You will have to learn the DOT Language, but it's fairly simple. Read more about Graphviz here.

Prerequisites

Install graphviz, imagemagick, and some fonts:

aptitude install graphviz imagemagick ttf-freefont ttf-bitstream-vera

Installation

  • Login to Dokuwiki under an administrative account and go to Admin→Plugins Or something like that.
  • Make sure <wikidir>/lib/plugins is writable by www-data.
  • Paste http://danjer.doudouke.org/graphviz.zip into the field and download the plugin. Dokuwiki will unzip and install it for you. There is no configuration.
  • Lock down <wikidir>/lib/plugins after this (group, world: read-only).
  • Test it out:
<graphviz>
digraph {
A->B;
B->C;
A->C;
}
</graphviz>

<graphviz> digraph { A→B; B→C; A→C; } </graphviz>

More Examples

:!: See http://www.graphviz.org/Gallery.php as well.

<graphviz>
digraph "network example" {
graph [label="Network Example"];

routerA [label="Core Router (12.12.12.12)", shape=box,color=blue];
firewallA [label="Firewall (10.0.0.1)", shape=box,color=red];
node [shape=box,style=filled,color=grey];
  switchA [label="Core Switch (10.0.0.2)"];
  switchB [label="1st Floor Switch (10.0.0.11)"];
  switchC [label="2nd Floor Switch (10.0.0.12)"];
  switchD [label="3rd Floor Switch (10.0.0.13)"];

node [style=solid, color=black];
edge [arrowhead=none];

routerA -> firewallA -> switchA;
switchA -> switchB [color=orange, label="Fiber Link gbic 0/1"];
switchA -> switchC [color=orange, label="Fiber Link gbic 0/2"];
switchA -> switchD [color=orange, label="Fiber Link gbic 0/3"];

switchA -> desktop1;
switchA -> desktop2;
switchA -> desktop3;
switchA -> desktop4;
switchA -> desktop5;

switchB -> desktop6;
switchB -> desktop7;
switchB -> desktop8;

switchC -> desktop9;
switchC -> desktop10;

switchD -> desktop11;
switchD -> desktop12;
switchD -> desktop13;
}
</graphviz>

<graphviz> digraph “network example” { graph [label=“Network Example”];

routerA [label=“Core Router (12.12.12.12)”, shape=box,color=blue]; firewallA [label=“Firewall (10.0.0.1)”, shape=box,color=red]; node [shape=box,style=filled,color=grey];

switchA [label="Core Switch (10.0.0.2)"];
switchB [label="1st Floor Switch (10.0.0.11)"];
switchC [label="2nd Floor Switch (10.0.0.12)"];
switchD [label="3rd Floor Switch (10.0.0.13)"];

node [style=solid, color=black]; edge [arrowhead=none];

routerA → firewallA → switchA; switchA → switchB [color=orange, label=“Fiber Link gbic 0/1”]; switchA → switchC [color=orange, label=“Fiber Link gbic 0/2”]; switchA → switchD [color=orange, label=“Fiber Link gbic 0/3”];

switchA → desktop1; switchA → desktop2; switchA → desktop3; switchA → desktop4; switchA → desktop5;

switchB → desktop6; switchB → desktop7; switchB → desktop8;

switchC → desktop9; switchC → desktop10;

switchD → desktop11; switchD → desktop12; switchD → desktop13; } </graphviz>

Links

http://wiki.splitbrain.org/plugin:graphviz
http://wiki.ioslo.net/dokuwiki/graphviz - Home of the plugin, but SVN access seems to be broken right now (Wed Apr 30 09:52:52 EDT 2008)
http://danjer.doudouke.org/tech/dokutexit#other_rendering_plugins - Modified Graphviz plugin. I was able to download from here.
http://en.wikipedia.org/wiki/Graphviz
http://www.graphviz.org/

 
howtos/computers/dokuwiki/graphviz_plugin.txt · Last modified: 2008/06/11 18:26 (external edit)
 
Recent changes RSS feed Driven by DokuWiki