diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-04-17 14:08:45 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-04-17 14:08:45 +0000 |
| commit | aedd7f485397b322fc88c60241fa1e5e684fd2b4 (patch) | |
| tree | 2727053dbe2b8585430e20d779a2b25c9bae0d2b /docs/gen/md | |
| parent | remove defunct alv-copilot.bat (diff) | |
| download | alive-aedd7f485397b322fc88c60241fa1e5e684fd2b4.tar.gz alive-aedd7f485397b322fc88c60241fa1e5e684fd2b4.zip | |
move extra/ to docs/gen/ and split up
Diffstat (limited to 'docs/gen/md')
| -rwxr-xr-x | docs/gen/md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/gen/md b/docs/gen/md new file mode 100755 index 0000000..32d4fdd --- /dev/null +++ b/docs/gen/md @@ -0,0 +1,23 @@ +#!/usr/bin/env moon +import layout, autoref from require 'docs.gen.layout' +import compile from require 'discount' + +export OUT, ESCAPE + +slurp = (file) -> + file = io.open file, 'r' + with file\read '*all' + file\close! + +spit = (file, str) -> + file = io.open file, 'w' + file\write str + file\close! + +ESCAPE = (str) -> + (str\gsub '([*`])', '\\%1') + +{ OUT, file } = arg + +contents = slurp file +spit OUT, layout compile (autoref contents), 'githubtags', 'fencedcode' |
