Yuml extension for Sphinx
Author: | Nicolas JOUANIN <nicolas.jouanin@gmail.com> |
---|
About
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.
Quick Example
This source:
.. yuml:: [Customer]->[Billing Address]
Installing from git checkout
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
Sphinx
Enabling the extension inJust add sphinxcontrib.yuml
to the list of extensions in the conf.py
file. For example:
extensions = ['sphinxcontrib.yuml']
Usage
Options
-
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
Configuration
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.