Skip to main content
https://img.shields.io/pypi/v/sphinxcontrib-autosaltsls.svg https://travis-ci.com/Tanoti/sphinxcontrib-autosaltsls.svg?branch=master Documentation Status Updates Python 3 https://img.shields.io/badge/code%20style-black-000000.svg

Sphinx AutoSaltSLS provides a way to automatically document Salt .sls files (e.g. states, pillar, reactors, etc) using simple directives in the comments blocks of those files.

A comment block is identified using a block start string (default is ‘###’) and contains all subsequent lines that start with a given comment character (default is ‘#’’). The block ends when a new start string or a non-comment line is read. Directives can be given in the comment block to control how the lines are parsed.

Getting Started

The following steps will walk through how to add AutoSaltSLS to an existing Sphinx project. For instructions on how to set up a Sphinx project, see Sphinx’s documentation on Getting Started.

Installation

AutoSaltSLS can be installed through pip:

pip install sphinxcontrib-autosaltsls

Next, add and configure AutoSaltSLS in your Sphinx project’s conf.py.

extensions.append('sphinxcontrib-autosaltsls')

autosaltsls_sources = {
    'states': {
        'title': 'States',
        'template_path': '_templates/autosaltsls/states',
    },
    'pillar' : {
        'title': 'Pillar'
    },
}

The documentation will be built into the location specified by autosaltsls_build_root (defaults to ‘.’)

To configure AutoAPI behaviour further, see the Configuration documentation.

Basic Setup

The absolute minimum setup is to set autosaltsls_sources as a list of directories under your salt fileset area (e.g. /srv/salt) and let the extension index the files it finds. Documentation pages will be created but, unless the sls files have had their document comment blocks enabled, they will say “No content”.

autosaltsls_sources = [
    'states',
    'pillar',
]

See Comment Block Format for more information on how to enable these.

To Do

  • Write proper tests

Credits

This project was based on the logic behind both readthedocs/sphinx-autoapi and Jakski/sphinxcontrib-autoyaml, so many thanks to those projects for getting me started.

Metadata

Release files for sphinxcontrib-autosaltsls 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinxcontrib-autosaltsls 0.5.0
File Size Uploaded
sphinxcontrib-autosaltsls-0.5.0.tar.gz 19.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinxcontrib-autosaltsls 0.5.0
File Interpreter ABI Platform
sphinxcontrib_autosaltsls-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 40.3 kB

Release files / sphinxcontrib-autosaltsls-0.5.0.tar.gz

Download URL sphinxcontrib-autosaltsls-0.5.0.tar.gz
Size 19.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5474d64a9894e6e9cea6cfe31be1deaeac86af0570ea440a2b9da85e42125764
BLAKE2b-256 checksum
How to use checksums
c29b7362a1b1537873700fda1b63550deb0e027864960869432414ab630dce12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.1

Release files / sphinxcontrib_autosaltsls-0.5.0-py3-none-any.whl

Download URL sphinxcontrib_autosaltsls-0.5.0-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0f754d86a1eecf69dc6739eb4cf3ab649687d1e332d2e06dbc45f765c5ba5aa
BLAKE2b-256 checksum
How to use checksums
895a416b569098728c48f3f7158ef60233f066b95bfa858e8c263f6bfddcf015
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.1

Release history Release notifications | RSS feed

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

This release

0.5.0 This release

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.12

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page