Run commands against code blocks in reStructuredText and Markdown files.
Project description
doccmd
A command line tool for running commands against documentation files.
Installation
With pip
Requires Python 3.11+.
pip install doccmd
With Homebrew (macOS, Linux, WSL)
Requires Homebrew.
brew tap adamtheturtle/doccmd
brew install doccmd
Usage example
# Run mypy against the Python code blocks in README.md and CHANGELOG.rst
$ doccmd --language=python --command="mypy" README.md CHANGELOG.rst
# Run gofmt against the Go code blocks in README.md
# This will modify the README.md file in place
$ doccmd --language=go --command="gofmt -w" README.md
TODO:
Add documentation (automated, and link to it, and add pre-commits for Sphinx stuff, update urls.Source)
Release Homebrew
Release pre-commit hook
Verbose mode… “Running command “X” against README.rst example from line …”
Allow multiple languages (e.g. shellcheck versus shell, sh, bash)
Add license (also to sybil-extras)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
doccmd-2024.9.11.3.tar.gz
(20.0 kB
view hashes)
Built Distribution
Close
Hashes for doccmd-2024.9.11.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70f59fdfd351d9d482ca6fcb5296bcffa1f23c1b2f959d3c6bee4be5078f264a |
|
MD5 | d2c37345b0a7033511c965842f374390 |
|
BLAKE2b-256 | 756a1a96dd791051581a9d00f0164d9595a14cdcf10cd46a4a4127329f29ab44 |