Include code examples to sphinx documentation
Project description
Sphinx Example Includer
Automatically Generate .rst files from examples folder for the sphinx documentation
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
- Generate the docs using Sphinx.
- Install the library into your project.
- Run the package as follows
python -m sphinx_example_includer
(don't forget to pass the arguments). - add the toc file to the
indext.rst
(or any other place of your choice). - 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
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4b0cbfb958e1682b94551bb97c6da0841cef34c9c71260b4df5ddd45556fea2 |
|
MD5 | b94ac69d7ef8f70074629ac38c2f9b2d |
|
BLAKE2b-256 | 91845d5c4df0cfa545e0734445321746b34326322f7cc74ce6c07e1de8c8a5b8 |
File details
Details for the file sphinx_example_includer-0.2-py3-none-any.whl
.
File metadata
- Download URL: sphinx_example_includer-0.2-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd6580a65530d36d726274144fe69cedf174b7bcf9bdc89505f2137d00d30d95 |
|
MD5 | 188d1f7c3498317f95dd061c909b4e4e |
|
BLAKE2b-256 | bea43aa892b3e742387fdcf4e67887c0f06373e8a8f181efe391b6fcfd72d17f |