I resurrected the GraphViz Sitemap Generator I created 5 years ago. The generator takes a file with tab separated values as input -- 1 line for each node of a sitemap or flow chart -- and outputs hierarchical or radial graphs as GIF and SVG.
The generator was on a long hiatus because I didn't want to keep maintaining it, but I dusted it off to do a quick graph. You can expect it to stay up indefinitely, but I don't predict it will get that much use since we have such good desktop tools for doing this kind of thing. It is nice for running large text files through it, however, which is why I use it occasionally.
I created the Graphviz SiteMap Generator to demonstrate how the AT&T/Lucent Bell Labs Graphviz application can be used to generate diagrams such as sitemaps and automate some of the kinds of documents produced during web design. While this tool was created as a proof of concept to illustrate how one kind of diagram can be generated, other diagrams such as network graphs, flow charts, and the like can be generated from tabular data.
- Download the GraphViz PHP script source code here (index.php).
- Download the code sanitizing script here (sanitize.php).
- You'll need to modify paths in your script. Follow the notes in script comments.
I'm doing some slight modification to the Graphviz Sitemap Generator directories. I was considering only providing the source code for the application on the server and discontinuing the sitemap generator's use. The output directory is close to 150MB right now, with 2 years of people's site maps. Some of the larger site maps are weighing in around 2MB in size. I run this site on a shared host and my storage space is limited, so every bit of space is needed.
Instead of pulling the application, from now on I'm going to expunge the output directories every day around midnight, Eastern Time. So if you are a user of the sitemap generator, you will need to save all of your output locally, because it will not be there the next day.
I think this compromise should work OK. I only put that script up so that people could see that GraphViz might be a viable package to use for automated site map generation so they could then install on their own servers. Looks like quite a few people have been using it regularly to generate all kinds of diagrams.
Update Lovely! Look at how much disk space I've saved with this new daily cleanup.
The Image_GraphViz pear class interacts with GraphViz.
People have been asking for the PHP script that runs the GraphViz Site Map Generator so with some reluctance I am now offering it for free use under GPL. I'm mainly reluctant to share it so openly because it shows my limited understanding of PHP :(. But if you want to hack away at it to make it better, please send me back the improvements you've made. You can grab the script (it's one file), but I'm not going to be offering any major support. Let me know if you use it successfully somewhere.
I actually spent 15 minutes to modify the GraphViz SiteMap Generator so that it will produce working SVG Diagrams like this.. Have to figure out how to specify the font size and overlap options in the SVG file, however because the text on the boxes is enormous.
The basic fix I did in this version was to go through the SVG that GraphViz generates and remove an HTML comment produced in the file. PHP I used came from this thread about using PCRE library to remove HTML comments with PHP:
$infile= preg_replace('//', '', $infile);
Am starting to feel the limitations of GraphViz. We're running against a db with 600+ nodes at work and both dot and twopi are producing huge files that are incomplete gifs. Tom was running a 2000+ file against the script on this site and was producing errors as well. Perhaps there is a limitation to the number of nodes or the number of nodes at a certain level? Not sure.
Updated the GraphViz Sitemap Generator to be able to produce radial diagrams, circles, and fills per shape.
I wrote an interface to graphviz in PHP that takes a pipe delimitted file and converts it to a site map. Sample files to look at:
Going to work a bit at adding more options, e.g. ability to select shape and line colors, font size, and page size.