休息使用
rstctl的Python项目详细描述
内容
Description
rstctl是帮助您处理reStructuredText
Usage
HTML preview
您可以预览文件:
$ rstctl -w path/to/file.rst
或者包裹的详细描述:
$ ls setup.py setup.py $ rstctl -w
这将在您喜爱的浏览器中打开结果。
Check links
您可以使用-l
选项向文档结尾添加未知引用。
示例:
$ cat README.txt Title ===== `incomplete ref`_ $ ./bin/rstctl -l README.txt <string>:4: (ERROR/3) Unknown target name: "incomplete ref". .. _incomplete ref: 1 links append to README.txt $ cat README.txt Title ===== `incomplete ref`_ .. _incomplete ref:
然后你可以添加正确的链接。
Generating Sphinx documentation
转到包根目录,然后使用--sphinx选项:
$ rstctl --sphinx docs/conf.py Using /Users/gawel/py/rstctl/rstctl/module.tmpl Writing docs/modules/rstctl.txt Skipping rstctl.pdf excluded by conf.py Skipping rstctl.rst_directive excluded by conf.py Using /Users/gawel/py/rstctl/rstctl/module.tmpl Writing docs/modules/rstctl.serve.txt Using /Users/gawel/py/rstctl/rstctl/module.tmpl Writing docs/modules/rstctl.template.txt Using /Users/gawel/py/rstctl/rstctl/module.tmpl Writing docs/modules/rstctl.utils.txt Writing index
在toctree中添加modules/index
如果要排除某些模块,请将其添加到conf.py:
rstctl_exclude = ['rstctl.rst_directive', 'rstctl.pdf']
您还可以在conf.py的扩展名中添加rstctl.sphinx。
0.4 (2010-03-06)
- 添加--sphinxoption+sphinx扩展名
0.1 (2008-11-31)
- 初始版本