diff options
author | Ronan Collobert <ronan@collobert.com> | 2014-03-19 21:56:50 +0400 |
---|---|---|
committer | Ronan Collobert <ronan@collobert.com> | 2014-03-19 21:56:50 +0400 |
commit | dd8dd901547c0e46699a7a78c9d4ec1930715622 (patch) | |
tree | 80c5cf466cd511381c04183bfc3891e4b68cd3f3 | |
parent | c423f04619eea814175ca34233aeea785c069ddc (diff) |
mdcat exec
-rw-r--r-- | mdcat.lua | 5 | ||||
-rw-r--r-- | rocks/sundown-scm-1.rockspec | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/mdcat.lua b/mdcat.lua new file mode 100644 index 0000000..c3f075b --- /dev/null +++ b/mdcat.lua @@ -0,0 +1,5 @@ +#!/usr/bin/env lua + +local ascii = require 'sundown.ascii' +assert(#arg == 1, 'usage: mdcat <file.md>') +print(ascii.render(io.open(arg[1]):read('*all'))) diff --git a/rocks/sundown-scm-1.rockspec b/rocks/sundown-scm-1.rockspec index 8733c19..586c5a4 100644 --- a/rocks/sundown-scm-1.rockspec +++ b/rocks/sundown-scm-1.rockspec @@ -19,6 +19,11 @@ dependencies = { build = { type = "builtin", + install = { + bin = { + mdcat = "mdcat.lua" + } + }, modules = { ["sundown.env"] = "env.lua", ["sundown.init"] = "init.lua", |