Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document file types this works on #14

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down