使用python的docutils重构文本到docbook的转换器。
msrst2db的Python项目详细描述
使用python的docutils重构文本到docbook的命令行转换器, 包括狮身人面像建筑商。
使用命令行实用程序
rst2db <filename> [-e root_element] [-o output_file] [-t template_file]
只需要要处理的文件名。所有其他设置都是可选的。
设置:
-e root_element set the root element of the resulting DocBook file. If this is not specified, then ‘section’ will be used. -o output_file set the output filename to write. If this is not specified, then output will be sent to stdout.
使用Sphinx生成器
配置
要使用sphinx构建docbook输出,请将abstrys.docbook.builder添加到 扩展名列表在conf.py:
extensions = [ ... other extensions here ... abstrys.sphinx.docbook_builder ]
conf.py有一个可配置参数,对应于 rst2db.py参数:
docbook_default_root_element: | |
---|---|
default root element for a file-level document. Default is ‘section’. |
运行生成
生成器是以“docbook”名称注册的,因此要运行使用 生成器,用-b docbook运行sphinx-build。
许可证
此软件是在BSD 3-Clause许可证下提供的。见 LICENSE文件了解更多详细信息。
有关详细信息
联系人:eron hennessey<;eron@abstrys.com>;