Contents
Render PlantUML diagrams in wiki pages
Description
This plugin allows the integration of PlantUML on Trac wiki pages, where the diagrams are dynamically generated and embedded. See below for examples.
PlantUML is a Java utility that allows generation of different types of UML diagrams (such as sequence, activity, state, use cases, objects) from a simple text description file. PlantUML itself is distributed under the GPL license.
This macro can be used as follows:
- As a WikiProcessor with markup:
{{{#!PlantUml @startuml Alice -> Bob: Authentication Request Bob --> Alice: Authentication Response Alice -> Bob: Another authentication Request Alice <-- Bob: another authentication Response @enduml }}}
will render the following UML diagram:
- As a WikiProcess rendering files from the repository:
{{{#!plantuml path="/path/to/repository" ... }}} {{{#!plantuml path="/repos/path/to/repository@rev" ... }}}
- As a macro rendering files from the repository:
[[PlantUml(/path/to/repository)]] [[PlantUml(/path/to/repository@rev)]]
Additional documentation can be found on the WikiMacros page after installing the macro. More information on the PlantUML language and different types of UML diagrams can be found on the PlantUML Website.
See also:
- MermaidMacro Render mermaid diagrams in wiki pages
- MscgenPlugin Add message sequence chart diagrams with mscgen to Trac wiki page
- TracBlockDiagPlugin Render blockdiag diagrams into Trac wiki pages
- WebSequenceDiagramPlugin Render UML diagrams on Trac wiki and ticket pages
Bugs/Feature Requests
Existing bugs and feature requests for PlantUmlMacro.
If you have any issues, create a new ticket.
defect |
15 / 17 |
||
---|---|---|---|
enhancement |
8 / 9 |
||
task |
6 / 6 |
Download
Download the zipped source from here.
The macro is also available on PyPI.
Source
You can check out PlantUmlMacro from here using Subversion, or browse the source with Trac.
Installation
General instructions on installing Trac plugins can be found on the TracPlugins page.
Notes:
- Below instructions should be specific to some operating systems. Please help expanding these instructions.
[sudo]
is optional in case you already have authorisation to modify your server.
Installation steps:
- Check dependencies:
- A valid Java runtime environment.
- plantuml.jar: save it to the location that you'll specify in the configuration section
/path/to/plantuml.jar
:- Download PlantUML jar:
[sudo] wget https://sourceforge.net/projects/plantuml/files/plantuml.jar
- Check version of PlantUML jar:
cd /path/to/plantuml.jar [sudo] java -jar plantuml.jar -version
- Download PlantUML jar:
- Graphviz: check if installed and working as required in graphvizdot.
[sudo] java -jar plantuml.jar -testdot
- Install component:
- with easy_install, globally:
[sudo] easy_install https://trac-hacks.org/svn/plantumlmacro/trunk
- with easy_install, globally:
- Enable this component as follows:
- by updating trac.ini file under appropriate configuration section;
[components] plantuml.* = enabled
- or accessing your Admin panel (under selected Trac environment
..admin/general/plugins
).
- by updating trac.ini file under appropriate configuration section;
- Configure the Trac environment as follows:
- by updating trac.ini file under appropriate configuration section;
[plantuml] plantuml_jar = /path/to/plantuml.jar java_bin = /path/to/java_bin (optional, if Java binary is not on the search path)
- example:
plantuml_jar = /project-resources/trac/plugins
. - example:
java_bin = java
, assumes that the Java binary is on the search path.
- example:
- or accessing your Admin panel under selected Trac environment
..admin/general/plugins
.
- by updating trac.ini file under appropriate configuration section;
- Restart web server:
- Apache on Ubuntu, example command line:
[sudo] /etc/init.d/apache2 restart
- Apache on Ubuntu, example command line:
- Test if this component is working properly (main environment and secondary ones if you have). If this component is installed correctly, then the example shown in the #Usage section should be also displayed on the WikiMacros#PlantUML-macro page.
Recent Changes
- 18647 by jun66j5 on 2024-07-11 09:31:25
-
TracPlantUml 2.3.1dev: make compatible with Trac 1.6 and Python 3 (closes #14337)
- 17597 by rjollos on 2019-11-26 05:41:59
-
TracPlantUml 2.3: Tag version 2.3
The release has been published to pypi:TracPlantUml/2.3
Fixes #13679.
- 17596 by rjollos on 2019-11-26 05:39:24
-
TracPlantUml 2.3dev: Add
classifiers
metadata
Refs #13679.
(more)
Author/Contributors
Author: airadier
Maintainers: Ryan J Ollos
Contributors: ebencheung, Erwin Rademaker
Attachments (1)
- sequence.PNG (6.2 KB) - added by 13 years ago.
Download all attachments as: .zip