All Projects → sbrunner → sphinx-prompt

sbrunner / sphinx-prompt

Licence: BSD-3-Clause license
Sphinx directive to add unselectable prompt

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to sphinx-prompt

sphinx-revealjs
Presentation builder for Pythonista
Stars: ✭ 56 (+43.59%)
Mutual labels:  sphinx-extension
sphinx-toolbox
Box of handy tools for Sphinx 🧰 📔
Stars: ✭ 55 (+41.03%)
Mutual labels:  sphinx-extension
autodoc pydantic
Seamlessly integrate pydantic models in your Sphinx documentation.
Stars: ✭ 60 (+53.85%)
Mutual labels:  sphinx-extension
sphinx-substitution-extensions
Extensions for Sphinx which allow substitutions
Stars: ✭ 32 (-17.95%)
Mutual labels:  sphinx-extension
autoprogram
Documenting CLI programs
Stars: ✭ 37 (-5.13%)
Mutual labels:  sphinx-extension
restbuilder
A Sphinx builder/writer to output reStructuredText (rst) files
Stars: ✭ 25 (-35.9%)
Mutual labels:  sphinx-extension
openapi
OpenAPI (fka Swagger) spec renderer for Sphinx.
Stars: ✭ 78 (+100%)
Mutual labels:  sphinx-extension
sphinx rtd dark mode
Adds a toggleable dark mode to the Read the Docs theme for Sphinx.
Stars: ✭ 29 (-25.64%)
Mutual labels:  sphinx-extension
sphinx-codeautolink
Automatic links from code examples to reference documentation
Stars: ✭ 41 (+5.13%)
Mutual labels:  sphinx-extension
sphinxcontrib-jupyter
A Sphinx Extension for Generating Jupyter Notebooks
Stars: ✭ 72 (+84.62%)
Mutual labels:  sphinx-extension
sphinxext-rediraffe
Sphinx extension to redirect files
Stars: ✭ 27 (-30.77%)
Mutual labels:  sphinx-extension
httpdomain
Documenting RESTful HTTP APIs
Stars: ✭ 51 (+30.77%)
Mutual labels:  sphinx-extension
sphinxcontrib-programoutput
Sphinx extension for capturing program output
Stars: ✭ 29 (-25.64%)
Mutual labels:  sphinx-extension
sphinxcontrib-django
This is a sphinx extension which improves the documentation of Django apps.
Stars: ✭ 37 (-5.13%)
Mutual labels:  sphinx-extension
readthedocs-sphinx-search
Enable search-as-you-type feature for docs hosted by RTD.
Stars: ✭ 24 (-38.46%)
Mutual labels:  sphinx-extension
sphinx-traceability-extension
Traceability extension for Sphinx documentation generator
Stars: ✭ 24 (-38.46%)
Mutual labels:  sphinx-extension
sphinxcontrib-hdl-diagrams
Sphinx Extension which generates various types of diagrams from Verilog code.
Stars: ✭ 37 (-5.13%)
Mutual labels:  sphinx-extension
matlabdomain
A Sphinx extension for documenting Matlab code
Stars: ✭ 34 (-12.82%)
Mutual labels:  sphinx-extension
emojicodes
An extension to use emoji codes in your Sphinx documentation! 😍
Stars: ✭ 39 (+0%)
Mutual labels:  sphinx-extension
plantuml
No description or website provided.
Stars: ✭ 87 (+123.08%)
Mutual labels:  sphinx-extension

Sphinx Prompt

Initialise

In conf.py add extensions += ['sphinx-prompt'].

Syntax

A default prompt can be created using a prompt directive:

.. prompt::

   <statements>

The prompt can be further customized in one of two ways:

  • Using positional arguments:

    .. prompt:: [<language> [<prompts> [<modifiers>]]]
    
       <statements>
    
  • Using options:

    .. prompt::
        :language: <language>
        :prompts: <prompts>
        :modifiers: <modifiers>
    
       <statements>
    

While these constructs generate the same output, the positional arguments cannot be used if you want to use a prompt that contains spaces. This is a limitation of reStructuredText.

Positional arguments can be mixed with options if they don't overlap (so if you pass prompts using options, you can only pass the language using positional arguments):

.. prompt:: bash
    :prompts: (cool_project) $

   python3 -m pip install --upgrade sphinx-prompt

Language

Supported language:

  • text (no pigments, default)
  • bash
  • batch
  • powershell
  • python
  • scala

Prompt(s)

If modifier is auto, a comma-separated list of prompts to find in the statements.

Else the prompt to add on each statements, for Python and Bash language the end \ is supported.

Defaults to empty, except for the shell languages listed below:

  • bash - $
  • batch - C:\>
  • powershell - PS C:\>

Examples

See: http://sbrunner.github.io/sphinx-prompt/

Run tests and prospector

python3 -m pip install --user --upgrade poetry
poetry install
poetry run pytest
poetry run prospector

The code should be formatted with black add isort.

Create new release

Update the version in setup.cfg.

python3 -m pip install --user --upgrade git-changelog
git-changelog . > CHANGELOG.md
git add setup.cfg CHANGELOG.md
git commit -m "Do the release <version>"
git tag <version>
git push origin <version>
git push
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].