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

https://github.com/ap--/mdpp

one file markdown preprocessor
https://github.com/ap--/mdpp

Last synced: over 1 year ago
JSON representation

one file markdown preprocessor

Awesome Lists containing this project

README

          

# Markdown Preprocessor #

I created this markdown preprocessor, because I didn't like
[gpp](http://en.nothingisreal.com/wiki/GPP) and it was quicker to write this
than looking for something else, or implementing my favorite syntax in other
preprocessors.

If you're looking for alternatives, check out
[Markdown-PP](https://github.com/jreese/markdown-pp) or
[zang](https://github.com/32bitkid/zang).

## mdpp ##

It's one file, and really dead simple. Strings are parsed in the following way:

* markdown **"\<\!--@"** and **"@--\>"** are used to encapsulate the commands
```

```
* In python it looks up _COMANDNAME_ in a _dict_ which returns a function
that does something with _ARGUMENTS_ and returns a string.

Just run

~~~ {.bash}
./mdpp myfile.md
~~~

You can exclude commands by specifying

~~~ {.bash}
./mdpp --without .INCLUDECODE --without .OPTIONALFIGURE myfile.md
~~~

Piping:

~~~ {.bash}
cat example.md | ./mdpp -
~~~

Listing available commands:

~~~ {.bash}
./mdpp --list
~~~

Remove unknown commands from code:

~~~ {.bash}
./mdpp --clean
~~~