reST 工具
项目描述
描述
rstctl 是一个帮助您使用 reStructuredText 的脚本
用法
HTML预览
您可以预览一个文件
$ rstctl -w path/to/file.rst
或包的长期描述
$ ls setup.py setup.py $ rstctl -w
这将在新浏览器窗口中打开结果。
检查链接
您可以使用 -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:
然后您可以添加正确的链接。
生成Sphinx文档
转到包根目录,然后使用 --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)
添加 --sphinx 选项 + Sphinx 扩展
0.1 (2008-11-31)
首次发布
项目详情
关闭
rstctl-0.4.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | da7e6da6b3d222140beaf8380b89fd14903a0f2ccd2a13da5f3a03625e3467b9 |
|
MD5 | d1f5d81638f3e0d249cbb029a36d4dd2 |
|
BLAKE2b-256 | 9565abfa1e2c81bda1521c6d41116a0720ee68b17c8f57c2717473a24aa85a9a |