Code Monkey home page Code Monkey logo

markatzea's Introduction

markatzea

This project's README.md and stdout codeblocks are created using markatzea:

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

pod2text markatzea
NAME
    markatzea - evaluate your markdown code blocks

SYNOPSIS
    markatzea <file>

DESCRIPTION
    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'
```
echo 'Does not evaluate this bash code-block'

Evaluated code-block

```bash bash
echo 'Does evaluate this bash code-block with 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;'
```
echo 'const value = 42;'
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 for more information.

An example:

set -eo pipefail

Now we use the aliased template in another template.

<sane-bash-defaults

ls not-a-file |
  cat - ||
  echo 'Good! The ls process caused the pipe to stop.'
Good! The ls process caused the pipe to stop.

Projects that use markatzea

A list of projects that use markatzea.

Notice that it makes it easier to maintain and test documentation by making usage examples runnable and thereby testable.

License

GPL-3.0

markatzea's People

Contributors

bas080 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

plainedit

markatzea's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.