skip to navigation
skip to content

rst2db 1.0

A reStructuredText to DocBook converter using Python's docutils.

A reStructuredText to DocBook command-line converter using Python’s docutils, with an included Sphinx builder.

Using the command-line utility

rst2db <filename> [-e root_element] [-o output_file] [-t template_file]

Only the filename to process is required. All other settings are optional.


-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.
-t template_file

set a template file to use to dress the output. You must have Jinja2 installed to use this feature.

Use {{data.root_element}} and {{data.contents}} to represent the output of this script in your template.

Using the Sphinx builder


To build docbook output with Sphinx, add abstrys.docbook.builder to the extensions list in

extensions = [
   ... other extensions here ...

There are two configurable parameters for that correspond to parameters:

 template file that will be used to position the document parts. Requires Jinja2 to be installed if specified.
 default root element for a file-level document. Default is ‘section’.

Running a build

The builder is registered with the name ‘docbook’, so to run a build that uses the builder, run sphinx-build with -b docbook.


This software is provided under the BSD 3-Clause license. See the LICENSE file for more details.

For more information

Contact: Eron Hennessey <>

File Type Py Version Uploaded on Size
rst2db-1.0.tar.gz (md5) Source 2015-04-21 7KB
  • Downloads (All Versions):
  • 5 downloads in the last day
  • 53 downloads in the last week
  • 298 downloads in the last month