3 ms·
To regenerate the markdown file I run this command in the console: cog -r README.md Presumably most IDEs have q mechanism that can run that command automa
by simonw 5y ago
To regenerate the markdown file I run this command in the console:
cog -r README.md
Presumably most IDEs have q mechanism that can run that command automatically, either when a file changes or just intermittently over time.
I use VS Code's markdown preview panel, which updates automatically when I manually run the "cog -r" command.
- ash 5y agoNice! I didn't know about cog. I've developed a simple "codeblocks" tool that to keep README.md up-to-date. In your example, here is how to insert the latest `--help` output: codeblocks usage-auth README.md -- google-drive-to-sqlite auth --help Where "usage-auth" is the block language in README.md: Full `--help`: ```usage-auth Usage: ... ``` Checking is also possible: codeblocks --check usage-auth README.md -- google-drive-to-sqlite auth --help It's not as generic as cog, but does not require writing codegen scripts inside Markdown file. https://github.com/shamrin/codeblocks https://github.com/shamrin/codeblocks