The project integrates Graphviz into Fitnesse wiki.
Java
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.settings Formatting Feb 1, 2016
src/main Variable regrace fix May 18, 2016
.classpath Initial Commit Jan 29, 2016
.gitignore
.project
LICENSE.md
README.md
pom.xml Fixed exception on plugin load. Mar 18, 2016

README.md

Overview

The project integrates Graphviz into Fitnesse wiki.

Installation

  1. Install Graphviz on machine where your Fitnesse is running.
  2. Copy jar file from this project Releases to plugins directory of your Fitnesse.
  3. Restart Fitnesse

Configuration

The configuration is optional. Plugin will work also without any configuration. Plugin loads its configuration from file fitnesse-graphviz-plugin.properties located in same directory as jar file. Usually in plugins directory of your Fitnesse.

Path to dot executable

It is optional. The plugin searches for dot executable. You can set dot executable in configuration file.

dotExecutable = c:\\Program Files (x86)\\Graphviz2.38\\bin\\dot.exe

Usage

After installation and Fitnesse restart you should be able to use command on wiki

!startdot
digraph G {
    size ="4,4";
    fitnesse [shape=box];
    fitnesse -> graphviz [style=bold,label="uses"];
}
!enddot

The command !startdot has following syntax !startdot ["title"] [align] [width] [height]

  • Title has to be surronded by ""
  • align can be one of
    • c - center
    • r - right
    • l - left
  • width is width in pixels
  • height is height in pixels

How it works

The plugin parses all lines after !startdot and before !enddot. It creates dot file in temporary directory with parsed lines. It starts dot executable with arguments dot -Tsvg <generated dot file>. It inserts stdout from dot execution into Fitnesse page.

Thanks

I would like to thank Tibor Trnovsky for idea how to align picture in HTML with <div> tags (GraphicsSvg.java).

I would like to thank Plantuml developers for code that searches dot executable (GraphvizDotFinder.java).