Metadata-Version: 2.1
Name: Sphinx-Substitution-Extensions
Version: 2018.11.12.1
Summary: Extensions for Sphinx which allow for substitutions.
Home-page: https://github.com/adamtheturtle/sphinx-substitution-extensions
Author: Adam Dangoor
Author-email: adamdangoor@gmail.com
License: MIT License
Keywords: sphinx rst documentation
Platform: UNKNOWN
Classifier: Operating System :: POSIX
Classifier: Environment :: Web Environment
Classifier: Programming Language :: Python :: 3.5
Classifier: License :: OSI Approved :: MIT License
Requires-Dist: sphinx-prompt (==1.0.0)
Requires-Dist: sphinx (==1.8.2)
Provides-Extra: dev
Requires-Dist: autoflake (==1.2); extra == 'dev'
Requires-Dist: check-manifest (==0.37); extra == 'dev'
Requires-Dist: doc8 (==0.8.0); extra == 'dev'
Requires-Dist: dulwich (==0.19.8); extra == 'dev'
Requires-Dist: flake8-commas (==2.0.0); extra == 'dev'
Requires-Dist: flake8-quotes (==1.0.0); extra == 'dev'
Requires-Dist: flake8 (==3.6.0); extra == 'dev'
Requires-Dist: isort (==4.3.4); extra == 'dev'
Requires-Dist: mypy (==0.641); extra == 'dev'
Requires-Dist: pip-check-reqs (==2.0.3); extra == 'dev'
Requires-Dist: pydocstyle (==3.0.0); extra == 'dev'
Requires-Dist: pyenchant (==2.0.0); extra == 'dev'
Requires-Dist: pygithub (==1.43.3); extra == 'dev'
Requires-Dist: pylint (==2.1.1); extra == 'dev'
Requires-Dist: pyroma (==2.4); extra == 'dev'
Requires-Dist: pytest-cov (==2.6.0); extra == 'dev'
Requires-Dist: pytest (==3.10.1); extra == 'dev'
Requires-Dist: twine (==1.12.1); extra == 'dev'
Requires-Dist: vulture (==1.0); extra == 'dev'
Requires-Dist: yapf (==0.24.0); extra == 'dev'

|Build Status|

|codecov|

|requirements|

Sphinx Substitutions Extensions
===============================

Extensions for Sphinx which allow substitutions.

.. contents::

Installation
------------

Setup
~~~~~

* Add the following to ``conf.py``:

.. code:: python

   extensions += ['sphinx_substitution_extensions']

* Set the following variable in ``conf.py``:

.. code:: python

   substitutions = (
       ('|release|', '0.1'),
       ('|author|', 'Eleanor'),
   )

This will replace ``|release|`` in the new directives with ``0.1``, and ``|author|`` with ``Eleanor``.

Directives
----------

``substitution-prompt``
~~~~~~~~~~~~~~~~~~~~~~~

Then use the following:

.. code:: rst

   .. substitution-prompt:: bash

      echo "|author| released version |release|"

This is an extension of `sphinx-prompt`_.

``substitution-prompt`` acts similarly to `sphinx-prompt`_, and adds replacement functionality.

Credits
-------

``sphinx-prompt`` authors
~~~~~~~~~~~~~~~~~~~~~~~~~

Thanks to `@sbrunner`_ and other contributors for `sphinx-prompt`_.
``substitution-prompt`` is based on `sphinx-prompt`_.

ClusterHQ
~~~~~~~~~

This package is largely inspired by code written for Flocker by ClusterHQ.

Contributing
------------

See `CONTRIBUTING.rst <./CONTRIBUTING.rst>`_.

.. |Build Status| image:: https://travis-ci.com/adamtheturtle/sphinx-substitution-extensions.svg?branch=master
    :target: https://travis-ci.com/adamtheturtle/sphinx-substitution-extensions
.. _sphinx-prompt: https://github.com/sbrunner/sphinx-prompt
.. _@sbrunner: https://github.com/sbrunner
.. |codecov| image:: https://codecov.io/gh/adamtheturtle/sphinx-substitution-extensions/branch/master/graph/badge.svg
  :target: https://codecov.io/gh/adamtheturtle/sphinx-substitution-extensions
.. |requirements| image:: https://requires.io/github/adamtheturtle/sphinx-substitution-extensions/requirements.svg?branch=master
     :target: https://requires.io/github/adamtheturtle/sphinx-substitution-extensions/requirements/?branch=master
     :alt: Requirements Status


