I'm testing the code examples provided in docs files, but my setup is rather clumsy, also it takes rather long to launch the npx part (codedown). Wonder waht is the best practice for this?
echo.py is a preprocessor that removes the offset from cotent tabs, maybe it soulddo the codedownjb as weel and maybe even lauch the code examples.
# Run Python code from docs
docs-py:
poetry run python docs/echo.py docs/quick_start.md | npx codedown python > docs/quick_start.py
poetry run python docs/quick_start.py
poetry run python docs/echo.py docs/index.md | npx codedown python > docs/_index.py
poetry run python docs/_index.py
# Run console examples from docs
docs-cli:
poetry run python docs/echo.py docs/quick_start.md | npx codedown bash > docs/quick_start.bat
cd docs && rm -f chart.json entries.linejson && quick_start.bat
poetry run python docs/echo.py docs/index.md | npx codedown bash > docs/_index.bat
cd docs && rm -f chart.json entries.linejson && _index.bat
I'm testing the code examples provided in docs files, but my setup is rather clumsy, also it takes rather long to launch the npx part (
codedown
). Wonder waht is the best practice for this?echo.py
is a preprocessor that removes the offset from cotent tabs, maybe it soulddo thecodedown
jb as weel and maybe even lauch the code examples.