跳转到主要内容

Sphinx "astah" 扩展;使用astah嵌入图表

项目描述

sphinxcontrib-astah

https://travis-ci.org/tk0miya/sphinxcontrib-astah.svg?branch=master https://coveralls.io/repos/tk0miya/sphinxcontrib-astah/badge.png?branch=master https://codeclimate.com/github/tk0miya/sphinxcontrib-astah/badges/gpa.svg

此包包含astah Sphinx扩展。

此扩展允许您通过astah 嵌入图表。以下代码是示例

.. image:: [filename]

.. astah-image:: [filename]

.. astah-figure:: [filename]

   caption of figure

设置

安装

$ pip install sphinxcontrib-astah

此扩展使用命令行中的astah。您需要设置astah和Java包。

配置Sphinx

sphinxcontrib.astah 添加到conf.py 中的extensions

extensions += ['sphinxcontrib.astah']

并将您的API密钥设置为astah_command_path

astah_command_path = '/path/to/astah-command.sh'

指令

.. image:: [filename], .. figure:: [filename]

使用此扩展,imagefigure 指令可以将astah图像嵌入到文档中。同时,指令通过 :option: 选项接受 sheet 参数。

示例

.. image:: my-diagram.asta

.. figure:: my-diagram.asta

   caption

.. image:: my-diagram.asta
   :option: sheet=class-diagram

.. astah-image:: [filename]

此指令将图表插入到文档中。如果您的图表有多个工作表,请在 # 后指定sheetid。

示例

.. astah-image:: my-diagram.asta

.. astah-image:: my-diagram.asta#class-diagram

选项与 image 指令 相同。

.. astah-figure:: [filename]

此指令将图表及其标题插入到文档中。

示例

.. astah-figure:: my-diagram.asta

   Structure of this system

选项与 figure 指令 相同。

配置选项

astah_command_path

astah-command.sh (或 astah-command.bat) 的路径

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源代码分发

sphinxcontrib-astah-1.0.0.tar.gz (4.3 kB 查看哈希值)

上传时间 源代码

构建分发

sphinxcontrib_astah-1.0.0-py2.py3-none-any.whl (6.0 kB 查看哈希值)

上传时间 Python 2 Python 3

支持