Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/njouanin/sphinxcontrib-yuml

Sphinx extension for embedding yuml diagrams in documentations
https://github.com/njouanin/sphinxcontrib-yuml

Last synced: 2 months ago
JSON representation

Sphinx extension for embedding yuml diagrams in documentations

Awesome Lists containing this project

README

        

=============================
Yuml extension for Sphinx
=============================

:author: Nicolas JOUANIN

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

Enabling the extension in Sphinx_
---------------------------------

Just 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`` :
image format used for the different builders. ``latex`` and ``html`` formats
are supported.

For example::

yuml_format = dict(latex='pdf', html='png')

``yuml_options`` :
Yuml options used for diagram generation.

For example::

yuml_format = dict(style='scruffy', direction='LR', type='class')

These are the actual defaults.


.. Links:
.. _yUML: http://yuml.me/
.. _Sphinx: http://sphinx.pocoo.org/