Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cdklabs/markmac

Embed program outputs in markdown
https://github.com/cdklabs/markmac

Last synced: 3 months ago
JSON representation

Embed program outputs in markdown

Awesome Lists containing this project

README

        

# markmac

> Markdown macros - embed program outputs in markdown

Let's say I have a markdown file `test.md` which looks like this:

```test
# Hello, World

This is _just markdown_.

## Current date is:

## Current time is:

```

If I pipe it through `markmac`, the macro commands will be executed and their
STDOUT will be embedded between `` and ``.

```console
$ cat test.md | markmac
# Hello, World

This is _just markdown_.

## Current date is:

10/07/2020

## Current time is:

15:48

```

`markmac` searches for the `` directives inside your markdown file,
executes the command in `exec` and substitutes the contents between ``
and `` with STDOUT.

## Installation

This program is distributed via npm, so it can be installed through `yarn` or
`npm` or any other supporting client:

```shell
npm i -g markmac
```

## License

[Apache 2.0](./LICENSE)