Changeset 3376
- Timestamp:
- 04/05/09 21:08:42 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DirectedGraphPlugin/data/System/DirectedGraphPlugin.txt
r3372 r3376 1 %META:TOPICINFO{author=" Main.ProjectContributor" date="1237950808" format="1.1" reprev="1.6" version="1.6"}%1 %META:TOPICINFO{author="ProjectContributor" date="1238965436" format="1.1" reprev="1.7" version="1.7"}% 2 2 ---+!! Directed Graph Plugin 3 3 4 5 6 7 4 %TOC% 8 9 5 ---++ Introduction 10 6 … … 13 9 This plugin uses [[http://www.graphviz.org/][Graphviz's]] applications to create an image of a directed graph. The directed graph is described using a simple text markup called "The DOT Language". This markup is written between =<dot>= and =</dot>= tags. By default, a png image attachment is created and displayed inline, replacing the =<dot>= markup. Any other requested formats are saved as attachments. 14 10 15 | %X% By default, this version of the plugin uses the Foswiki API to manipulate the attached graphs. The first user to view a topic containing a directed graph will be denied access if they do not have update permission. If defaults or DOT parameters have changed, viewing the topic may modify attachments, which will require update permission. | 11 Visit the [[http://www.graphviz.org/Gallery.php][Graphviz gallery]] to see some examples on what can be achieved with this plugin and Graphviz. Full documentation is available at http://graphviz.org/Documentation.php. 12 13 | %X% *Caution* =<dot>= syntax is not currently compatible with the WYSIWYG editor. Raw editing is recommended, or use <sticky> tags to protect the dot tags. | 14 ---+++ Attachment Handling 15 | %X% *By default, this version of the plugin uses the Foswiki API to manipulate the attached graphs. The first user to view a topic containing a directed graph will be denied access if they do not have update permission. If defaults or DOT parameters have changed, viewing the topic may modify attachments, which will require update permission.* | 16 17 Each generated file is attached to the topic using the Foswiki attachment API. This results in revision control of the attached files, and updates to the topic for each generated file. If Foswiki is configured to increment a new revision for each update (See <a target="_top" href="http://foswiki.org/System/ForceNewRevision">http://foswiki.org/System/ForceNewRevision</a> and config parameter =$Foswiki::cfg{ReplaceIfEditedAgainWithin} = 0= ), then every updated attachment will result in a new topic revision. The alternative to this behavior is to use the expert parameter attachPath - set in bin/configure - to configure the plugin to do direct file I/O and bypass the attach API. 18 19 Direct file I/O results in a considerable performance improvement. Initial rendering of this topic on a test system resulted in a reduction of time to generate the attachments and initially display from 60 seconds down to approximately 8 seconds. 16 20 17 21 | %X% *Caution* The plugin will also update attached files during __Preview__. if the edit is subsequently canceled, the attachments will be regenerated again. | 18 22 19 A MD5 hash is calculated for each dot command input and the results saved in the Foswiki work_area directory. The hash file is named with the Web name, the Topic name, and the suffix ==-filehash== If the calculated hash matches on subsequent page visits, the attached graphics files are used without rerunning Graphviz. If the hash doesn't match, the attachments are regenerated. 23 The output of the <dot> command is cached as attachments to the topic. Any change to the <dot> input will result in the attachments being updated. 24 25 A MD5 hash is calculated for each dot command input and the hash is saved in the Foswiki work_area directory. The hash file is named with the Web name, the Topic name, and the suffix ==-filehash== If the calculated hash matches on subsequent page visits, the attached graphics files are used without rerunning Graphviz. If the hash doesn't match, the attachments are regenerated. 20 26 21 27 Default behavior is to leave any previously generated attachments even if the =<dot>= tags are removed from the file. If the configuration setting DELETEATTACHMENTS is enabled, then the plugin will remove any old attachments that are not needed. However if the final =<dot>= tag is removed, the plugin is not invoked, and the attachments will not be deleted. 22 23 28 <blockquote> 24 29 … … 28 33 If a topic is renamed, the ==-filehash== file in the workarea directory will be renamed as well and regeneration of attachment files will be avoided. 29 34 30 | %X% *Caution* =<dot>= syntax is not currently compatible with the WYSIWYG editor. Raw editing is recommended, or use <sticky> tags to protect the dot tags. |31 32 35 Also note that after changes that modify the order of generated image names, it may be necessary to refresh the browser cache with shift-reload. 33 34 Visit the [[http://www.graphviz.org/Gallery.php][Graphviz gallery]] to see some examples on what can be achieved with this plugin and Graphviz. Full documentation is available at http://graphviz.org/Documentation.php. 36 ---+++ The !GraphViz Engine 35 37 36 38 <nop>DirectedGraphPlugin supports the following engines: … … 40 42 * =twopi= - radial layout, after Graham Wills 97. 41 43 * =circo= - circular layout, after Six and Tollis 99, Kauffman and Wiese 02. Suitable for certain diagrams of multiple cyclic structures. 42 44 The markup is always entered between <dot> tags however regardless of the chosen engine. 43 45 ---++ Syntax Rules 44 46 … … 66 68 67 69 HowtoDirectedGraphs has a basic howto on creating directed graphs using dot. 68 69 70 ---++ Examples 70 71 … … 475 476 | Support: | http://foswiki.org/Support/%TOPIC% | 476 477 | Change History: | <!-- versions below in reverse order --> | 478 | 5 Apr 2009: | Foswikitask:Item8102 - Improve defaults, configure settings now optional --Foswiki:Main.GeorgeClar | 477 479 | 25 Mar 2009: | Foswikitask:Item1201, Foswikitask:Item1360 - Configure script fails on perl 5.10. %BR% Foswikitask:Item8086 - Direct File I/O failis. -- Foswiki:Main.GeorgeClark | 478 480 | 8 Jan 2009: | Foswikitask:Item8035: Uninitialized variables reported in server Error log.-- Foswiki:Main.GeorgeClark | … … 503 505 %META:FIELD{name="ExtensionClassification" attributes="" title="ExtensionClassification" value=""}% 504 506 %META:FIELD{name="ExtensionType" attributes="" title="ExtensionType" value="PluginPackage"}% 505 %META:FIELD{name="Compatibility" attributes="" title="[[Compatibility]]" value=" "}%507 %META:FIELD{name="Compatibility" attributes="" title="[[Compatibility]]" value="Tested on Linux and Windows. Windows version tested with !ActiveState perl and Strawberry perl, versions 5.8 and 5.10."}% 506 508 %META:FIELD{name="DemoUrl" attributes="" title="DemoUrl" value="http://"}% 507 509 %META:FIELD{name="DevelopedInSVN" attributes="" title="DevelopedInSVN" value="Yes"}%
Note: See TracChangeset
for help on using the changeset viewer.
