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
- Host: GitHub
- URL: https://github.com/ap--/mdpp
- Owner: ap--
- Created: 2014-03-23T15:45:11.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-05-21T14:57:54.000Z (about 12 years ago)
- Last Synced: 2025-01-20T16:06:05.405Z (over 1 year ago)
- Language: Python
- Size: 160 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
~~~