Author: | Nicolas JOUANIN <nicolas.jouanin@gmail.com> |
---|
This extensions allows rendering of plots using yUML service.
This extensions adds the yuml
directive that will replace the yuml commands with the generated by Yuml.
This source:
.. yuml:: [Customer]->[Billing Address]
Checkout sphinxcontrib-yuml:
$ git clone https://github.com/njouanin/sphinxcontrib-yuml.git
Change into the sphinxcontrib-yuml directory:
$ cd sphinxcontrib-yuml
Install the module:
$ python setup.py install
Enabling the extension in Sphinx
Just add sphinxcontrib.yuml
to the list of extensions in the conf.py
file. For example:
extensions = ['sphinxcontrib.yuml']
type
: class, activity or usecase- Type of diagram to draw
direction
: RL, LR, TD- Diagram direction (RL=right-to-left, LR=left-to-right, TD=top-down)
scale
: integer value- diagram scale
style
: scruffy, plain, boring- diagram style
For now one optional configuration is added to Sphinx. It can be set in
conf.py
file:
yuml_format
<dict>:image format used for the different builders.
latex
andhtml
formats are supported.For example:
yuml_format = dict(latex='pdf', html='png')
yuml_options
<dict>:Yuml options used for diagram generation.
For example:
yuml_format = dict(style='scruffy', direction='LR', type='class')
These are the actual defaults.