Added options to render diagrams using plantuml and mermaidjs external tools
This commit is contained in:
@@ -43,6 +43,14 @@ will add before the diagram contents (right after `@startuml`) the title and
|
||||
direction hint, and after each diagram contents (right before `@enduml`)
|
||||
2 notes attached to elements.
|
||||
|
||||
This generator also accepts a `cmd` parameter to specify a command to execute
|
||||
on the generated PlantUML source file to generate actual diagram image, for
|
||||
instance:
|
||||
```yaml
|
||||
plantuml:
|
||||
cmd: "/usr/bin/plantuml -tsvg \"diagrams/{}.puml\""
|
||||
```
|
||||
|
||||
An example PlantUML diagram is presented below:
|
||||
|
||||
```plantuml
|
||||
@@ -117,6 +125,14 @@ will add before the diagram contents (right after diagram type,
|
||||
e.g. `classDiagram`) diagram direction hint, and after each diagram contents
|
||||
2 notes attached to elements.
|
||||
|
||||
This generator also accepts a `cmd` parameter to specify a command to execute
|
||||
on the generated MermaidJS source file to generate actual diagram image, for
|
||||
instance:
|
||||
```yaml
|
||||
mermaid:
|
||||
cmd: "mmdc -i \"diagrams/{}.mmd\" -o \"diagrams/{}_mermaid.svg\""
|
||||
```
|
||||
|
||||
An example MermaidJS diagram is presented below:
|
||||
|
||||
```
|
||||
|
||||
@@ -52,6 +52,12 @@ To add an initial class diagram to your project, follow these steps:
|
||||
mmdc -i diagrams/some_class_diagram.mmd -o diagrams/some_class_diagram.svg
|
||||
```
|
||||
|
||||
Steps 3 and 4 can be combined into one step like follows:
|
||||
```
|
||||
clang-uml -p -n some_class_diagram -g plantuml -r --plantuml-cmd="plantuml -tsvg diagrams/{}.puml"
|
||||
```
|
||||
where `-r` enables diagram rendering and `--plantuml-cmd` specifies command
|
||||
to execute on each generated diagram.
|
||||
5. Add another diagram:
|
||||
```bash
|
||||
clang-uml --add-sequence-diagram another_diagram
|
||||
|
||||
Reference in New Issue
Block a user