cympfh / mdc

markdown trans-compiler (mkd-to-mkd)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mdc -- markdown compiler (markdown-to-markdown)

Markdown + some special syntax

Basic usage

mdc < in.md > out.md
mdc < in.md | pandoc -o out.html

Special Syntax

include system

You can embed the content of another file. If the file is markdown (.md, .mkd), the content will be embbed after compiled with mdc (please see tests/include-nest/actual.md).

Format:

@(filepath)

replaces the content of the file.

Example:

@(section1.md)

makes

(content of section1.md)

include system as a code snippet

Format:

@[filetype](filepath)

Example:

@[ruby](example.rb)

makes

```ruby
(content of example.rb)
```

graphviz (dot)

graphviz (dot) is a tool which make graph (nodes and edges) images. mdc calls dot and makes svg images when

```dot
    ...
    ...
```

snippet found.

Example:

```dot
digraph {
    P -> {X Y};
    Z -> {X Y};
    Z -> P [style=dashed];
}
```

gnuplot

requires gnuplot and svg terminal.

```gnuplot
    ...
    ...
```

Example:

```gnuplot
plot sin(x)
```

< exec

The line which begins with < (leftangle-space) will be interpreted as shell (bash) code, and executed.

Format:

< system command

Example:

This document was compiled at
< LANG=en date
.
10 count:
< seq 1 10 | tr '\n' ' '

[[ ]] link text == address

[[URL]]

makes

[HTML-Title](URL)

if HTML-Title can be fetched successfully, else

[URL](URL)

{{ }} OGP Block Link

{{URL}}
ezoic increase your site revenue

About

markdown trans-compiler (mkd-to-mkd)


Languages

Language:Ruby 98.0%Language:Makefile 2.0%