summaryrefslogtreecommitdiff
path: root/doc/lua-filters.md
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2022-12-12 17:15:34 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2022-12-12 09:35:21 -0800
commit928dde57b968066366b567201961dba6441d89e2 (patch)
tree0d297c3c3c4f95f8d7800838442ed502d5f6f57c /doc/lua-filters.md
parent09af316f360ff316b954af700be7d35e1dd0c29f (diff)
Lua: add pandoc.cli module
Allow processing of CLI options in Lua.
Diffstat (limited to 'doc/lua-filters.md')
-rw-r--r--doc/lua-filters.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index c3c528b76..5cefa28de 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -3583,6 +3583,36 @@ Usage:
[WriterOptions]: #type-writeroptions
+# Module pandoc.cli
+
+Command line options and argument parsing.
+
+## Fields {#pandoc.cli-fields}
+
+### default\_options {#pandoc.cli.default_options}
+
+Default CLI options, using a JSON-like representation (table).
+
+## Functions
+
+### parse_options {#pandoc.cli.parse_options}
+
+`parse_options (args)`
+
+Parses command line arguments into pandoc options. Typically this
+function will be used in stand-alone pandoc Lua scripts, taking
+the list of arguments from the global `arg`.
+
+Parameters:
+
+`args`
+: list of command line arguments ({string,...})
+
+Returns:
+
+- parsed options, using their JSON-like representation. (table)
+
+
# Module pandoc.utils
This module exposes internal pandoc functions and utility