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.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 449465289e4d6b88b11eb24e8e7b711eaf2b72d2a466349c0641c48ba25e232b |
|
MD5 | c1aa4de1f60edc95376fc304b3c0bb08 |
|
BLAKE2b-256 | fa945f23d4b9424752d115426feb8816f62ec5dd96b3c0090a137d720d4ce1a6 |
File details
Details for the file sphinx_example_includer-0.1-py3-none-any.whl
.
File metadata
- Download URL: sphinx_example_includer-0.1-py3-none-any.whl
- Upload date:
- Size: 8.2 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 | 5154f89c12326da72798d3de605a47800a470596f63041ee0b4b8389602ecd85 |
|
MD5 | 6a2b7fb0cb89df4cfb2c0c368a6ec55a |
|
BLAKE2b-256 | f3711df1a5c3ff772e0cf43ec4359471829336b61fd25cc238d6a8d6df13c962 |