From 3b778a86411d888d647d8a8740905f8b4e9d0b38 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 11 Sep 2024 20:02:50 +0100 Subject: [PATCH] Document file types this works on --- README.rst | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.rst b/README.rst index da5d9a9..9fbf18f 100644 --- a/README.rst +++ b/README.rst @@ -44,12 +44,43 @@ Usage example # This will modify the README.md file in place $ doccmd --language=go --command="gofmt -w" README.md +What does it work on? +--------------------- + +* reStructuredText (`.rst`) + +.. code-block:: rst + + .. code-block:: shell + + echo "Hello, world!" + +* Markdown (`.md`) + +.. code-block:: markdown + + ```shell + echo "Hello, world!" + ``` + +* MyST (`.md` with MyST syntax) + +.. code-block:: markdown + + ```{code-block} shell + echo "Hello, world!" + ``` + +* Want more? Open an issue! + TODO: * Add documentation (automated, and link to it, and add pre-commits for Sphinx stuff, update urls.Source) * Release pre-commit hook * Verbose mode... "Running command "X" against README.rst example from line ..." * Option to not delete file +* Document https://sybil.readthedocs.io/en/latest/rest.html#skipping-examples on docrun, and make it work +* https://github.com/simplistix/sybil/blob/master/sybil/parsers/rest/codeblock.py add .. code (not just code block), and same for MyST where it is even more popular .. |Build Status| image:: https://github.com/adamtheturtle/doccmd/actions/workflows/ci.yml/badge.svg?branch=main :target: https://github.com/adamtheturtle/doccmd/actions