This is a sphinx extension which render sequence diagrams by using Quick Sequence Diagram Editor (sdedit).
rendered:
source:
.. sequence-diagram::
:maxwidth: 500
:linewrap: false
:threadnumber: true
actor:Actor
sphinx:Sphinx[a]
dot:Graphviz
sdedit:Quick Sequence Diagram Editor
actor:sphinx.make html
sphinx:dot.render_diagram()
sphinx:sdedit.render_diagram()
You can get archive file at http://bitbucket.org/shibu/sdeditext_for_sphinx/
You can use .exe or .jar file (.sh, .bat is not tested yet).
PIL to create thumbnail
> easy_install sphinxcontrib-sdedit
To enable this extension, add sphinxcontrib.sdedit module to extensions option at conf.py.
import os, sys
# Path to the folder where sdedit.py is
# NOTE: not needed if the package is installed in traditional way
# using setup.py or easy_install
sys.path.append(os.path.abspath('/path/to/sphinxcontrib.sdedit'))
# Enabled extensions
extensions = ['sphinxcontrib.sdedit']
# Path to sedit -setup (http://sdedit.sourceforge.net/)
# you can use .jar, .exe, .bat, .sh
sdedit_path = '/path/to/sdedit-3.0.5.jar'
On Windows, you can also use the .exe version of sdedit. The configuration key sdedit_path is required. See also the complete list of the configuration keys.
This directive insert a sequence diagram into the generated document. This code block has a source script of Quick Sequence Diagram Editor.
See also
If you want to add options when sdedit is run, use this option.
This value is a list of parameters. Default value is [].
This option is a dictionary. In this version, it has following option:
maxwidth: If generated image’s width is larger than this value, create thumbnail image. Default value is 700.
You can overwrite it if you use directive’s option maxwidth.
New in version 0.2.
This file describes user-visible changes between the extension versions.
If not otherwise noted, the extensions in this package are licensed
under the following license.
Copyright (c) 2009 by the contributors (see AUTHORS file).
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.