Merge two beautiful concepts: the KISS principle and the Literate programming approach.
The KISS-Literate-Programming (from now on, KLP) is defined by the following rules:
make or some other command).KLP is agnostic about:
Optionally add the row below in your markdown file to get a badge
[](https://fibo.github.io/kiss-literate-programming)
Assuming source code rows embedded in README.md start with 4 spaces, then code examples can use the backtick syntax and being ignored.
If your target file is called foo.sh, then your Makefile will look like this:
.PHONY: foo.sh
foo.sh:
grep ' ' README.md | sed -e 's/ //' > foo.sh
Follows a list of examples embracing KLP method: