GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mathiasertl/structured-tutorials: Write Sphinx docs that can be run on your local system for verification.

BranchesTags
Open more actions menu

Latest commit

 

History

110 Commits
110 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docs
docs
 
 
structured_tutorials
structured_tutorials
 
 
tests
tests
 
 
tutorials/simple
tutorials/simple
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.readthedocs.yaml
.readthedocs.yaml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
fetch_swagger.sh
fetch_swagger.sh
 
 
generate-schema.py
generate-schema.py
 
 
pyproject.toml
pyproject.toml
 
 
uv.lock
uv.lock
 
 

Repository files navigation

structured-tutorials

image image image image image

structured-tutorials allows you to write tutorials that can be rendered as documentation and run on your system to verify correctness.

With structured-tutorials you to specify steps (commands, files to create, ...) in a YAML file. A Sphinx plugin allows you to render them in your project documentation. A command-line tool can load the YAML file and run it on your local system.

Please see the official documentation for more detailed information.

Installation / Setup

Install structured-tutorials:

pip install structured-tutorials

and configure Sphinx:

extensions = [
    # ... other extensions
    "structured_tutorials.sphinx",
]

# Optional: Root directory for tutorials (default: location of conf.py)
# structured_tutorials_root = DOC_ROOT / "tutorials"

Your first (trivial) tutorial

To create your first tutorial, create it in docs/tutorial.yaml (or elsewhere, if you configured structured_tutorials_root in conf.py):

parts:
  - commands:
      - command: structured-tutorial --help
        doc:
          output: |
            usage: structured-tutorial [-h] path
            ...

Run the tutorial

Run the tutorial with:

$ structured-tutorial docs/tutorials/quickstart/tutorial.yaml
usage: structured-tutorial [-h] path
...

Render tutorial in Sphinx:

Configure the tutorial that is being displayed - this will not show any output:

.. structured-tutorial:: quickstart/tutorial.yaml

.. structured-tutorial-part::

TODO

  • Test file existence or something like that
  • Platform independent "echo" step (useful for debugging/testing)
  • Run in vagrant

License

This project is licensed under the MIT License. See LICENSE file for details.

About

Write Sphinx docs that can be run on your local system for verification.

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.