|
Cookbook /
GraphVizSitemapSummary: Provide a GraphViz format for sitemap
Version: 2009-05-08
Prerequisites:
Status: alpha
Maintainer: Ed Wildgoose?
Questions answered by this recipe
DescriptionProduce graphviz output for a site map. Based on an initial implementation by Peter Bowers The output is currently just the raw graphviz commands and so you will need to run them through graphviz to generate something like a PDF and then stare at the PDF Installation
include_once("
NotesGo to the page you want to start the map from. Add You can optionally set a For instance, if I am starting my sitemap with Mygroup.Mypage with a 120-second timeout then my URL might look like this:
The output is currently just the raw graphviz commands and so you will need to run them through graphviz to generate something like a PDF and then stare at the PDF I will suggest a PDF is probably the best output option (plus a good PDF viewer with a zoom button!) because likely your map will take a good bit of scrolling and zooming to get around...! It's quite an interesting experience, but you might want to experiment with hacking the code to specifically exclude certain chunks of the site if this helps get a nice looking final output. Ideas for improvementThis is just a skeleton solution at present and needs improving: - Examine the recipe: PmGraphViz and specifically the last few lines of PHP run graphviz on the dot file and generate the result file - integrate these lines with this recipe and have the output actually return a downloadable PDF file - Perhaps revise this recipe to work on the output of a search query (ie it's a pmwiki search format function). This would allow more customisation of the pages to include in the output - Highlight internal/external/broken links - Add external links? Right now we use an optimisation to avoid parsing each page which only returns the internal page links. Could generate the HTML for each page and parse that for a more robust solution which gets internal AND external links? - Test for bugs due to the optimisation used in this recipe (we examine $page['targets'] which should be maintained by pmwiki...?) Release Notes
See Alsoeventually something like (:pmgraphviz -- [= (:include Group/Page?action=graphwiz:) =] :) could be use to generate and render the map on the fly Utopiah ContributorsEd Wildgoose Peter Bowers CommentsWhat can someone do with this recipe? One can generate a Graphviz http://www.graphviz.org/ source code that, when run through the Graphviz software, will generate a hierarchical tree image of the site. --Henning May 08, 2009, at 10:42 AM Will it generate an image of the whole sitemap? It will try to generate the source code for the while sitemap, but with large sites there are some limits - for example program execution time. --Henning May 08, 2009, at 10:42 AM What can someone do with this recipe? Will it generate an image of the whole sitemap? Can it be used for other pages as well? Matthias Günther It generated the "dot" output for the whole sitemap. However, it's then up to you (at present) to run graphviz to turn that into a PDF to view it -- Ed Wildgoose User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |