Skip to main content

Include code examples to sphinx documentation

Project description

Sphinx Example Includer

PyPI version

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.2.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

sphinx_example_includer-0.2-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinx_example_includer-0.2.tar.gz
  • Upload date:
  • Size: 8.3 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.2.tar.gz
Algorithm Hash digest
SHA256 e4b0cbfb958e1682b94551bb97c6da0841cef34c9c71260b4df5ddd45556fea2
MD5 b94ac69d7ef8f70074629ac38c2f9b2d
BLAKE2b-256 91845d5c4df0cfa545e0734445321746b34326322f7cc74ce6c07e1de8c8a5b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sphinx_example_includer-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cd6580a65530d36d726274144fe69cedf174b7bcf9bdc89505f2137d00d30d95
MD5 188d1f7c3498317f95dd061c909b4e4e
BLAKE2b-256 bea43aa892b3e742387fdcf4e67887c0f06373e8a8f181efe391b6fcfd72d17f

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