@@ -8,7 +8,7 @@ Installation
88
99 .. tab :: Linux
1010
11- .. code-block :: console
11+ .. code-block :: console
1212
1313 $ sudo apt install plantuml
1414
@@ -45,25 +45,120 @@ Installation
4545
4646 C:> python -m pip install sphinxcontrib-plantuml
4747
48- #. We then configure the ``conf.py ``:
48+ #. Configure Sphinx in the ``conf.py `` file :
4949
5050 .. code-block :: python
5151
52- extensions = [
53- ... ,
54- " sphinxcontrib.plantuml" ,
55- ]
52+ extensions = [... , " sphinxcontrib.plantuml" ]
5653
5754 plantuml = " /PATH/TO/PLANTUML"
5855
5956 .. note ::
6057 Also in Windows, the path is specified with ``/ ``.
6158
62- .. toctree ::
63- :titlesonly:
64- :hidden:
59+ Sequence diagram
60+ ----------------
61+
62+ .. image :: sequence-diagram.svg
63+
64+ .. code-block :: rest
65+
66+ .. uml::
67+
68+ Browser -> Server: Authentication request
69+ Server --> Browser: Authentication response
70+
71+ Browser -> Server: Another authentication request
72+ Browser <-- Server: Another authentication response
73+
74+ ``-> ``
75+ is used to draw a message between two actors. The actors do not have to be
76+ explicitly declared.
77+ ``--> ``
78+ is used to draw a dotted line.
79+ ``<- und <-- ``
80+ do not change the drawing, but can increase readability.
81+
82+ Use case diagram
83+ ----------------
84+
85+ .. image :: use-case-diagram.svg
86+
87+ .. code-block :: rest
88+
89+ .. uml::
90+
91+ :User: --> (usage)
92+ "Group of\nAdministrators" as Admin
93+ "Using the\napplication" as (usage)
94+ Admin --> (Administrate\nthe application)
95+
96+ Use cases are enclosed in round brackets ``() `` and resemble an oval.
97+
98+ Alternatively, the keyword ``usecase `` can also be used to define a use case. It
99+ is also possible to define an alias using the keyword ``as ``. This alias can
100+ then be used when defining relationships.
101+
102+ You can use ``\n `` to insert line breaks in the names of the use cases.
103+
104+ Activity diagram
105+ ----------------
106+
107+ ``(*) ``
108+ Start and end nodes of an activity diagram.
109+
110+ ``(*top) ``
111+ In some cases, this can be used to move the start point to the beginning
112+ of a diagram.
113+
114+ ``--> ``
115+ defines an activity
116+
117+ ``-down-> ``
118+ down arrow (default value)
119+ ``-right-> or -> ``
120+ arrow to the right
121+ ``-left-> ``
122+ Arrow to the left
123+ ``-up-> ``
124+ Arrow up
125+
126+ ``if ``, ``then ``, ``else ``
127+ Keywords for the definition of branches.
128+
129+ Example:
130+
131+ .. code-block :: rest
132+
133+ .. uml::
134+
135+ (*) --> "Initialisation"
136+ if ‘a test’ then
137+ -->[true] "An activity"
138+ --> "Another activity"
139+ -right-> (*)
140+ else
141+ ->[false] "Something else"
142+ -->[end of the process] (*)
143+ endif
144+
145+ .. image :: activity-diagram.svg
146+
147+ ``fork ``, ``fork again `` and ``end fork `` or ``end merge ``
148+ Keywords for parallel processing.
149+
150+ Example:
151+
152+ .. code-block :: rest
153+
154+ .. uml::
155+
156+ start
157+ fork
158+ :Action 1;
159+ fork again
160+ :Action 2;
161+ end fork
162+ stop
65163
66- sequence-diagram
67- use-case-diagram
68- activity-diagram
69- class-diagram
164+ .. image :: parallel.svg
0 commit comments