Metadata-Version: 2.4
Name: drain-swamp-snippet
Version: 1.0.3
Summary: Change portions of static config files
Author-email: Dave Faulkmore <faulkmore@protonmail.com>
License-Expression: AGPL-3.0-or-later
Project-URL: Changes, https://raw.githubusercontent.com/msftcangoblowm/drain-swamp-snippet/master/CHANGES.rst
Project-URL: Source code, https://github.com/msftcangoblowm/drain-swamp-snippet
Project-URL: Issue tracker, https://github.com/msftcangoblowm/drain-swamp-snippet/issues
Project-URL: Mastodon, https://mastodon.social/@msftcangoblowme
Keywords: snippet,pyproject.toml,Sphinx conf.py
Classifier: Environment :: Console
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Text Processing
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/x-rst
License-File: LICENSE
License-File: NOTICE.txt
Provides-Extra: dev
Requires-Dist: appdirs==1.4.4; extra == "dev"
Requires-Dist: attrs==24.3.0; extra == "dev"
Requires-Dist: black==26.10.1; extra == "dev"
Requires-Dist: blackdoc==0.4.6; extra == "dev"
Requires-Dist: click==8.5.0; extra == "dev"
Requires-Dist: coverage==7.6.10; extra == "dev"
Requires-Dist: exceptiongroup==1.2.2; extra == "dev"
Requires-Dist: fastjsonschema==2.21.1; extra == "dev"
Requires-Dist: flake8==7.1.1; extra == "dev"
Requires-Dist: flake8-pyi==24.9.0; extra == "dev"
Requires-Dist: flake8-pyproject==1.2.3; extra == "dev"
Requires-Dist: iniconfig==2.0.0; extra == "dev"
Requires-Dist: isort==5.13.2; extra == "dev"
Requires-Dist: logging-strict==1.7.2.post1; extra == "dev"
Requires-Dist: markdown-it-py==3.0.0; extra == "dev"
Requires-Dist: mccabe==0.7.0; extra == "dev"
Requires-Dist: mdurl==0.1.2; extra == "dev"
Requires-Dist: more-itertools==10.7.0; extra == "dev"
Requires-Dist: mypy==1.15.0; extra == "dev"
Requires-Dist: mypy-extensions==1.0.0; extra == "dev"
Requires-Dist: packaging==26.3; extra == "dev"
Requires-Dist: pathspec==1.1.1; extra == "dev"
Requires-Dist: platformdirs==4.9.6; extra == "dev"
Requires-Dist: pluggy==1.6.0; extra == "dev"
Requires-Dist: pycodestyle==2.12.1; extra == "dev"
Requires-Dist: pyflakes==3.2.0; extra == "dev"
Requires-Dist: pygments==2.19.1; extra == "dev"
Requires-Dist: pytest==8.3.4; extra == "dev"
Requires-Dist: pytest-datadir==1.5.0; extra == "dev"
Requires-Dist: pytest-logging-strict==0.2.4; extra == "dev"
Requires-Dist: pytest-regressions==2.5.0; extra == "dev"
Requires-Dist: python-dateutil==2.9.0.post0; extra == "dev"
Requires-Dist: pyyaml==6.0.2; extra == "dev"
Requires-Dist: rich==13.9.4; extra == "dev"
Requires-Dist: six==1.17.0; extra == "dev"
Requires-Dist: strictyaml==1.7.3; extra == "dev"
Requires-Dist: tomli==2.4.1; python_version < "3.11" and extra == "dev"
Requires-Dist: typing-extensions==4.15.0; python_version < "3.11" and extra == "dev"
Requires-Dist: validate-pyproject==0.24.1; extra == "dev"
Dynamic: license-file

drain-swamp-snippet
===================

Change portions of static config files

|  |kit| |codecov| |license|
|  |last-commit| |quality-status| |docs|
|  |platforms| |test-status| |versions|
|  |implementations| |black|
|  |downloads| |stars|
|  |mastodon-msftcangoblowm|

.. PYVERSIONS

\* Python 3.11 through 3.15, PyPy-3.11

**New in 1.0.x**

integration with drain-swamp-action; all badges; drop py39 py310;

**New in 0.0.x**

move snip from package drain-swamp;

Whats a snippet?
-----------------

Within a configuration, there are times when some bit of text needs to be changed.

The only requirement is the file format should recognize pound symbol ``#`` as a comment.

A snippet **without** an snippet code (id)

.. code:: text

   before snippet
   # @@@ editable
   code block
   # @@@ end
   after snippet

A snippet **with** an snippet code (id)

.. code:: text

   before snippet
   # @@@ i_am_a_snippet_co
   code block
   # @@@ end
   after snippet

`[read more] <https://drain-swamp-snippet.readthedocs.io/en/stable/snippets.html>`_

What batteries are included?
-----------------------------

None

This is a base package. Other authors are encouraged to:

- not reinvent the wheel

- avoid packages with snippet implementations, when only just want the base class, Snip

Packages using drain-swamp-snippet-pypi_
------------------------------------------

- drain-swamp-pypi_

.. _drain-swamp-pypi: https://pypi.org/project/drain-swamp
.. _drain-swamp-snippet-pypi: https://pypi.org/project/drain-swamp-snippet

Acknowledgement
---------------

The technique and initial implementation is from
`Ned Batchelder <https://github.com/nedbat>`_

Ned Batchelder is also the author of `cog <https://cog.readthedocs.io/en/latest/>`_
which creates content by embedding both Python code and output in the original file.

Check out `introduction to cog <https://nedbatchelder.com/blog/202409/cogged_github_profile.html>`_

.. note::

   `[original code] <https://github.com/nedbat/coveragepy/blob/0db5d1826d246955b96617a2b7118a40deaf8bb9/igor.py#L385>`_
   supports replacing one snippet per file, not idiot proof, nor unittested.

   `[coverage LICENSE:Apache-2.0] <https://github.com/nedbat/coveragepy/blob/0db5d1826d246955b96617a2b7118a40deaf8bb9/LICENSE.txt>`_

.. |last-commit| image:: https://img.shields.io/github/last-commit/msftcangoblowm/drain-swamp-snippet/master
    :target: https://github.com/msftcangoblowm/drain-swamp-snippet/pulse
    :alt: last commit to gauge activity
.. |test-status| image:: https://github.com/msftcangoblowm/drain-swamp-snippet/actions/workflows/testsuite.yml/badge.svg?branch=master&event=push
    :target: https://github.com/msftcangoblowm/drain-swamp-snippet/actions/workflows/testsuite.yml
    :alt: Test suite status
.. |quality-status| image:: https://github.com/msftcangoblowm/drain-swamp-snippet/actions/workflows/quality.yml/badge.svg?branch=master&event=push
    :target: https://github.com/msftcangoblowm/drain-swamp-snippet/actions/workflows/quality.yml
    :alt: Quality check status
.. |docs| image:: https://readthedocs.org/projects/drain-swamp-snippet/badge/?version=latest&style=flat
    :target: https://drain-swamp-snippet.readthedocs.io/
    :alt: Documentation
.. |kit| image:: https://img.shields.io/pypi/v/drain-swamp-snippet
    :target: https://pypi.org/project/drain-swamp-snippet/
    :alt: PyPI status
.. |versions| image:: image:: https://img.shields.io/badge/CI%20tested-3.11%20%7C%203.12%20%7C%203.13%20%7C%203.14%20%7C%203.15%20%7C%20pypy3.11-blue?logo=python&logoColor=FBE072
    :target: https://pypi.org/project/logging-strict/
    :alt: Python versions supported

.. https://img.shields.io/pypi/pyversions/drain-swamp-snippet.svg?logo=python&logoColor=FBE072

.. |license| image:: https://img.shields.io/github/license/msftcangoblowm/drain-swamp-snippet
    :target: https://pypi.org/project/drain-swamp-snippet/blob/master/LICENSE
    :alt: License
.. |mastodon-msftcangoblowm| image:: https://img.shields.io/mastodon/follow/112019041247183249
    :target: https://mastodon.social/@msftcangoblowme
    :alt: msftcangoblowme on Mastodon
.. |stars| image:: https://img.shields.io/github/stars/msftcangoblowm/drain-swamp-snippet.svg?logo=github
    :target: https://github.com/msftcangoblowm/drain-swamp-snippet/stargazers
    :alt: GitHub stars
.. |codecov| image:: https://codecov.io/gh/msftcangoblowm/drain-swamp-snippet/branch/master/graph/badge.svg?token=13dL2Owydg
    :target: https://codecov.io/gh/msftcangoblowm/drain-swamp-snippet
    :alt: drain-swamp coverage percentage
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
   :target: https://github.com/ambv/black
.. |downloads| image:: https://img.shields.io/pypi/dm/drain-swamp-snippet
.. |implementations| image:: https://img.shields.io/pypi/implementation/drain-swamp-snippet
.. |platforms| image:: https://img.shields.io/badge/platform-windows%20%7C%20macos%20%7C%20linux-lightgrey
