Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bas080/markatzea
Evaluate markdown code-blocks and render the output in markdown
https://github.com/bas080/markatzea
documentation generated literate markdown perl
Last synced: 20 days ago
JSON representation
Evaluate markdown code-blocks and render the output in markdown
- Host: GitHub
- URL: https://github.com/bas080/markatzea
- Owner: bas080
- License: gpl-3.0
- Created: 2021-06-18T16:19:37.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-28T21:35:16.000Z (over 1 year ago)
- Last Synced: 2023-07-28T22:33:33.616Z (over 1 year ago)
- Topics: documentation, generated, literate, markdown, perl
- Language: Perl
- Homepage:
- Size: 34.2 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# markatzea
This project's `README.md` and stdout codeblocks are created using
markatzea:```bash
markatzea README.mz > README.md
```Markatzea does not break your existing markdown. It adds a little syntax for
defining the interpreter for that code block. This is defined after the
code-block's language name. The code-block is then passed as stdin into the
interpreter configured for that code-block.## Usage
```bash
pod2text markatzea
```
```
NAME
markatzea - evaluate your markdown code blocksSYNOPSIS
markatzeaDESCRIPTION
markatzea is a tool which takes markdown, evaluates code blocks with
interpreters and prints the output of those processes to a different
codeblock.```
## Examples
### Normal code-block
When no interpreter is defined, markatzea will print the markdown as is.
```bash
echo 'Does not evaluate this bash code-block'
``````bash
echo 'Does not evaluate this bash code-block'
```### Evaluated code-block
```bash bash
echo 'Does evaluate this bash code-block with bash'
``````bash
echo 'Does evaluate this bash code-block with bash'
```
```
Does evaluate this bash code-block with bash
```### Output Language
You can define the language to use for the output code block.
```bash|javascript bash
echo 'const value = 42;'
``````bash
echo 'const value = 42;'
```
```javascript
const value = 42;
```### Literate Programming
You can achieve a form of a literate programming using a template language that
offers a command line interface. See [memplate][2] for more information.An example:
```bash
set -eo pipefail
```Now we use the aliased template in another template.
```bash
A list of projects that use markatzea.- https://github.com/bas080/markatzea
- https://github.com/bas080/patroon
- https://github.com/bas080/furver
- https://github.com/bas080/package.shNotice that it makes it easier to maintain and test documentation by making
usage examples runnable and thereby testable.## License
[GPL-3.0][1]
[1]:./LICENSE
[2]:https://github.com/bas080/memplate