aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlbert Krewinkel <[email protected]>2022-09-22 23:39:25 +0200
committerGitHub <[email protected]>2022-09-22 14:39:25 -0700
commit22fa51ded17367a49114a1dc993402294579f7ea (patch)
tree5b59dcd1375a3db296777758dd1308ab161340c5 /doc
parentbd1d923b86edba6e090ba14b1cd17e1e32c727f2 (diff)
Make pandoc behave like a Lua interpreter when called as `pandoc-lua`. (#8311)
Diffstat (limited to 'doc')
-rw-r--r--doc/pandoc-lua.md50
1 files changed, 50 insertions, 0 deletions
diff --git a/doc/pandoc-lua.md b/doc/pandoc-lua.md
new file mode 100644
index 000000000..bacceeb1b
--- /dev/null
+++ b/doc/pandoc-lua.md
@@ -0,0 +1,50 @@
+---
+title: pandoc-lua
+section: 1
+date: September 22, 2022
+---
+
+# SYNOPSIS
+
+`pandoc-lua` [*options*] [*script* [*args*]]
+
+# DESCRIPTION
+
+`pandoc-lua` is a standalone Lua interpreter with behavior similar
+to that of the standard `lua` executable, but exposing all of
+pandoc's Lua libraries. All `pandoc.*` packages, as well as the
+packages `re` and `lpeg`, are available via global variables.
+Furthermore, the globals `PANDOC_VERSION`, `PANDOC_STATE`, and
+`PANDOC_API_VERSION` are set at startup.
+
+If no script argument is given, then the script is assumed to be
+passed in via *stdin*. Interactive mode is not supported at this
+time.
+
+# OPTIONS
+
+`-e stat`
+: Execute statement `stat`.
+
+`-l mod`
+: If mod has the pattern `g=m`, then require library `m` into
+ global `g`; otherwise require library `mod` into global
+ `mod`.
+
+`-v`
+: Show version information.
+
+`-i`, `-E`, `-W`
+: Not supported yet; print a warning to that effect.
+
+# AUTHORS
+
+Copyright 2022 John MacFarlane ([email protected]) and
+contributors. Released under the [GPL], version 2 or later. This
+software carries no warranty of any kind. (See COPYRIGHT for full
+copyright and warranty notices.)
+
+Lua: Copyright 1994-2022 Lua.org, PUC-Rio.
+
+[GPL]: https://www.gnu.org/copyleft/gpl.html "GNU General Public License"
+