Skip to content

sampsyo/spliterate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spliterate

Spliterate is a disappointingly simple tool for literate programming using Markdown. You give it a Markdown file; it splits it into (a) a Markdown file with all the code blocks removed, and (b) a standalone file with just the code blocks' contents, stitched together.

It uses a real Markdown parser (Remark), not just the naive sed call, so it should Kinda Work™.

Split It

Install:

npm install -g spliterate

Split:

spliterate [-m out.md] [-c out.lang] in.md

By default, the tool will print the code contents to stdout. Use this mode if you just need to compile and execute the code from a Markdown document.

You can also use the -c FILE option to write the code contents to a file, and -m FILE to dump the code-free Markdown. If either or both of these is used, nothing is printed to stdout.

Author

This is by Adrian Sampson. The license is MIT.

About

literate programming tool for Markdown

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published