Skip to main content

Include code examples to sphinx documentation

Project description

Sphinx Example Includer

tests

Automatically Generate .rst files from examples folder for the sphinx documentation

examples screenshot

Installation

pip install sphinx_example_includer

Usage

usage: Sphinx Example Includer [-h] [--debug] [--overwrite] --files FILES [FILES ...] [--dest_dir DEST_DIR] [--toc-fname TOC_FNAME]

A tool to include example code or any other files into sphinx documentation automatically

options:
  -h, --help            show this help message and exit
  --debug               Showing debug messages
  --overwrite           Overwrite files that already exists
  --files FILES [FILES ...]
                        one or more files to be
  --dest_dir DEST_DIR   The output directory
  --toc-fname TOC_FNAME
                        The name of the toc file

Example

python -m sphinx_example_includer  --files examples/*example*py --overwrite --dest docs/source/examples 

How to use it

  1. Generate the docs using Sphinx.
  2. Install the library into your project.
  3. Run the package as follows python -m sphinx_example_includer (don't forget to pass the arguments).
  4. add the toc file to the indext.rst (or any other place of your choice).
  5. regenerate the docs (e.g., make html).

Project details


Download files

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

Source Distribution

sphinx_example_includer-0.1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

sphinx_example_includer-0.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_example_includer-0.1.tar.gz.

File metadata

  • Download URL: sphinx_example_includer-0.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for sphinx_example_includer-0.1.tar.gz
Algorithm Hash digest
SHA256 449465289e4d6b88b11eb24e8e7b711eaf2b72d2a466349c0641c48ba25e232b
MD5 c1aa4de1f60edc95376fc304b3c0bb08
BLAKE2b-256 fa945f23d4b9424752d115426feb8816f62ec5dd96b3c0090a137d720d4ce1a6

See more details on using hashes here.

File details

Details for the file sphinx_example_includer-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_example_includer-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5154f89c12326da72798d3de605a47800a470596f63041ee0b4b8389602ecd85
MD5 6a2b7fb0cb89df4cfb2c0c368a6ec55a
BLAKE2b-256 f3711df1a5c3ff772e0cf43ec4359471829336b61fd25cc238d6a8d6df13c962

See more details on using hashes here.

Supported by

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