[Mediawiki-l] More Layout Engines for Graphviz

Jan Steinman Jan at Bytesmiths.com
Tue Mar 15 14:47:13 UTC 2005


I wanted to use other layout engines besides dot(1), so I hacked 
Graphviz.php to allow a Unix-style interpreter specification for the 
other rendering engines in Graphviz. This is backwards compatible 
(since it is a legal dot comment) and avoids coming up with new syntax.

The interpreter spec must immediately follow the opening tag: 
"<graphviz>#!/sw/bin/neato" for example. I explicitly check for allowed 
rendering engines to avoid script injection security issues.

Extension at: <http://www.Bytesmiths.com/InfoArk/Graphviz.php.gz>

Annotated examples at: <http://www.IslandSeeds.org/wiki/Test:Graphviz>

Enjoy!

PS: It would be nice to have "out of band" communications with 
extensions, like <graphviz engine="neato">. It could simply bundle up 
everything it finds in the tag into an associative array. This would be 
very useful (for example) in text-wrapping, since so many extensions 
seem to generate images. (<graphviz style="float:right">, for example)

:::: The day Microsoft makes something that doesn't suck is probably 
the day they start making vacuum cleaners. -- Ernst Jan Plugge
:::: Jan Steinman <http://www.Bytesmiths.com/Item/98-4882-15>




More information about the MediaWiki-l mailing list