Welcome to sdedit extension’s for Sphinx

sdedit extension README

This is a sphinx extension which render sequence diagrams by using Quick Sequence Diagram Editor (sdedit).

rendered:

actor:Actor
sphinx:Sphinx[a]
dot:Graphviz
sdedit:Quick Sequence Diagram Editor

actor:sphinx.make html
sphinx:dot.render_diagram()
sphinx:sdedit.render_diagram()

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()

Setting

You can get archive file at http://bitbucket.org/shibu/sdeditext_for_sphinx/

Required components

Install

> easy_install sphinxcontrib-sdedit

Configure Sphinx

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.

Directive

.. sequence-diagram::

This directive insert a sequence diagram into the generated document. This code block has a source script of Quick Sequence Diagram Editor.

  • maxwidth: This is a integer option. default value is 700:
  • linewrap: This is a boolean option.
  • threadnumber: This is a boolean option.

See also

how to enter text
This page describes sdedit’s syntax.
how to enter text(Japanese)
This is Japanese translation of above document.

Configuration File Options

sdedit_path
This is a path for sdedit program. You can use .exe, .jar, .sh and .bat file path.
sdedit_java_path
If you set .jar files at sdedit_path, use this option to run .jar file. Default value is ‘java’.
sdedit_args

If you want to add options when sdedit is run, use this option.

This value is a list of parameters. Default value is [].

sdedit_default_options

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.

Indices and tables

ChangeLog

This file describes user-visible changes between the extension versions.

Version 0.3 (2009-11-09)

  • This module belongs to sphinx-contrib package.
  • Regist to PyPI.

Version 0.2 (2009-10)

  • Create thumbnail when result image size is larger than max_width.
  • Add default_format to sdedit_args.
  • Add max_width to sdedit_args opt and sequence-diagram directive.

Version 0.1 (2009-10-10)

  • Initial version.

License

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.

Table Of Contents

This Page