{"repo":"zimbatm/mdsh","free":true,"listed":false,"github":"https://github.com/zimbatm/mdsh","clone":"git clone https://github.com/zimbatm/mdsh.git","description":"`$ mdsh` # a markdown shell pre-processor","language":"Rust","stars":173,"topics":["markdown","shell","pre-processing","buildbot-numtide"],"license":"MIT","category":"cli-tools","readme_excerpt":"$ mdsh - a markdown shell pre-processor The mdsh project describes a Markdown language extension that can be used to automate some common tasks in README.md files. Quite often I find myself needing to embed a snippet of code or markdown from a different file. Or I want to show the output of a command. In both cases this can be done manually, but what all you had to do was run mdsh and have the file updated automatically? So the goal of this tool is first to extend the syntax of Markdown in a natural way. Something that you might type. And if the mdsh tool is run, the related blocks get updated in place. Most other tools would produce a new file but we really want a sort of idempotent operation here. In the end this gives a tool that is a bit akin to literate programming or jupyer notebooks but for shell commands. It adds a bit of verbosity to the file and in exchange it allows to automate the refresh of those outputs. See the source code of ./spec.clear.md and ./spec.processed.md for everything that mdsh can. Usage Run mdsh --help mdsh command The mdsh \"Command\" consists of these parts: in cmd defines how and where to source data, it can be one of three: - lang — produce code block with lang (similarly to current as lang statements). - — produce raw markdown output fenced by comment-tags - ! — expand data to shell variables with these 3 3 commands you get 9 combinations, for example: - py yml $ ./script.py foo $bar — execute script.py foo $bar in shell and produce yml code bl","default_branch":null,"files":null,"tree":[],"storefront":"/r/zimbatm","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/zimbatm/mdsh/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}