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 | RSS feed

This version

1.4

Download files

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

Source Distribution

msrst2db-1.4.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

msrst2db-1.4-py2.py3-none-any.whl (9.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file msrst2db-1.4.tar.gz.

File metadata

  • Download URL: msrst2db-1.4.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for msrst2db-1.4.tar.gz
Algorithm Hash digest
SHA256 a7419f2c9411a54ccdb7c3e0b1333ed6a24031832e362eaad42b226018a12231
MD5 8cacfa3501bc44e6f5d46412f244a634
BLAKE2b-256 cd3a4e2a5fe67dc22d591183643f205b026e2eedd0168b90c6f5883c6e07826c

See more details on using hashes here.

File details

Details for the file msrst2db-1.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for msrst2db-1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b1069b5e50820db82877d10cccf20804a5cff4653ef95b34c98c61080a2d5983
MD5 36885f8aaed6f035e3d62311899d6c39
BLAKE2b-256 be9e517b5511c3dbb2913b5c5b169c272575d1c6fbc0e009ef34e18c1b60610b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page