summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-10-01 15:23:20 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2017-10-01 15:23:20 -0700
commit3e77ea4792979879a80e67f20712766e4af2fdf5 (patch)
tree25288071a1b424628f3aedc947e24bfc4f4e8ad4 /doc
parent4c3b3bf65a769eaec4b8382d8ada4f28a3b91e04 (diff)
Lua: added 'pipe', which encapsulates Text.Pandoc.Process.pipeProcess.
This is hard to do in lua, so it's helpful to provide this.
Diffstat (limited to 'doc')
-rw-r--r--doc/lua-filters.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index 851a061c5..f9c92528b 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -1075,6 +1075,20 @@ Lua functions for pandoc scripts.
local fp = pandoc.mediabag.sha1("foobar")
+[`pipe (command, args, input)`]{#mediabag-sha1}
+
+: Runs command with arguments, passing it some input,
+ and returns the exit code and the output.
+
+ Returns:
+
+ - Exit code from command.
+ - Output of command.
+
+ Usage:
+
+ local ec, output = pandoc.pipe("sed", {"-e","s/a/b/"}, "abc")
+
# Submodule mediabag