Skip to main content

A reStructuredText to DocBook converter using Python's docutils.

Project description

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.

Settings:

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

Using the Sphinx builder

Configuration

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

extensions = [
   ... other extensions here ...
   abstrys.sphinx.docbook_builder
   ]

There are one configurable parameter for conf.py that correspond to rst2db.py parameters:

docbook_default_root_element:
 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.

License

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

For more information

Contact: Eron Hennessey <eron@abstrys.com>

Project details


Release history Release notifications

This version
History Node

1.4

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
msrst2db-1.4-py2.py3-none-any.whl (9.1 kB) Copy SHA256 hash SHA256 Wheel py2.py3
msrst2db-1.4.tar.gz (7.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page