sphinx泛型节点“todo-like”扩展
sphinxcontrib-gen_node的Python项目详细描述
一个通用的“todo-like”节点。
你喜欢Sphinx Ext Todo,想要更多这样的指令吗?
这个分机是给你的。
install me使用zc.buildout pip easy_u install或clone and setup.py install开发并将其添加到conf.py中
extensions = ['sphinxcontrib.gen_node'] gen_nodes = [('sample_one', True, True, False), ('sample_two', True, False, False),]
解释
gen_nodes是一个元组列表,您现在可以像使用“sphinx ext todo”那样为文档中的每个元素添加元组:
新的示例指令
.. sample_one:: one thing
新的sample\u onelist指令
.. sample_onelist::
如果在conf.py gen_nodes=[(“sample_one”,false,false,false),…第二个参数中设置false,则sample_onelist将不会出现在文档中。
选项:
sample_one is the name of your new admonition, you’ll write
.. sample_one:: A text hereThe first (True|False) argument enables the list Plz note that the form of a “list directive is always ‘namenode’+list ie
.. sample_onelist::the second (True|False) renders gathering by doc subtitle
the third (True|False) renders a paragraph with filename and line number (like on todo-list) with sphinxext.todo
易于安装
easy_install sphinxcontrib-gen_node
点
pip install Sphinx pip sphinxcontrib-gen_node
zc.buildout
eggs = Sphinx sphinxcontrib-gen_node
更新源代码/conf.py:
extensions = ['sphinxcontrib.gen_node'] gen_nodes = [('sample_one', True, True, False), ('sample_two', True, False, False)]
更改日志
0.1(2013-10-31)
- jean-philippe camguilhem<;jean-philippe.camguilhem\u网址:www.makina-corpus.com>;
贡献者
Jean-Philippe Camguilhem,作者