sphinx“astah”扩展;使用astah嵌入图表
sphinxcontrib-astah的Python项目详细描述
狮身人面像
这个包包含astah sphinx扩展。
此扩展允许您通过astah嵌入关系图。 以下代码是示例:
.. image:: [filename] .. astah-image:: [filename] .. astah-figure:: [filename] caption of figure
设置
安装
$ pip install sphinxcontrib-astah
此扩展使用命令行中的astah。您需要设置astah和java包。
配置sphinx
将sphinxcontrib.astah添加到extensionsatconf.py:
extensions += ['sphinxcontrib.astah']
并将api密钥设置为astah_command_path:
astah_command_path = '/path/to/astah-command.sh'
指令
。图像::[文件名],。图::[文件名]
With this extension, image and figure directives can embed astah image to documents. At the same time, the directives accept sheet parameter through :option: option.
Examples:
.. image:: my-diagram.asta .. figure:: my-diagram.asta caption .. image:: my-diagram.asta :option: sheet=class-diagram
。astah图像::[文件名]
This directive insert a diagram into the document. If your diagram has multiple sheets, specify sheetid after ^{tt4}$.
Examples:
.. astah-image:: my-diagram.asta .. astah-image:: my-diagram.asta#class-diagramOptions are same as image directive .
。一个图:【文件名】
This directive insert a diagram and its caption into the document.
Examples:
.. astah-figure:: my-diagram.asta Structure of this systemOptions are same as figure directive .
配置选项
astah_命令路径
path to astah-command.sh (or astah-command.bat)