Sphinx“cacoo”扩展;从cacoo嵌入图表
sphinxcontrib-cacoo的Python项目详细描述
SphinxContrib cacoo
sphinx扩展允许您将cacoo上的关系图嵌入到文档中:
.. image:: https://cacoo.com/diagrams/EWHRuF5Kox1AnyNL .. figure:: https://cacoo.com/diagrams/EWHRuF5Kox1AnyNL caption of figure
设置
安装
$ pip install sphinxcontrib-cacoo
配置sphinx
将sphinxcontrib.cacoo添加到extensionsatconf.py:
extensions += ['sphinxcontrib.cacoo']
并将api密钥设置为cacoo_apikey:
cacoo_apikey = 'your apikey'
用法
请将caoo图的url提供给image或figure指令 作为参数:
.. image:: https://cacoo.com/diagrams/EWHRuF5Kox1AnyNL .. figure:: https://cacoo.com/diagrams/EWHRuF5Kox1AnyNL caption of figure
指令
为了向后兼容,这个扩展提供了以下两个方向。
。cacoo图片::[url]
This directive insert a diagram into the document. If your diagram has multiple sheets, specify sheetid after ^{tt4}$.
Examples:
.. cacoo-image:: https://cacoo.com/diagrams/EWHRuF5Kox1AnyNL .. cacoo-image:: https://cacoo.com/diagrams/mb53vvmYG38QGUPf#37D74Options are same as image directive .
。cacoo图::[url]
This directive insert a diagram and its caption into the document.
Examples:
.. cacoo-figure:: https://cacoo.com/diagrams/EWHRuF5Kox1AnyNL Structure of this systemOptions are same as figure directive .