diff options
| author | Albert Krewinkel <albert@zeitkraut.de> | 2023-01-16 18:17:32 +0100 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2023-01-16 10:12:09 -0800 |
| commit | 5d58f060ac7bcf0fd1978db76a5df53fd08aa576 (patch) | |
| tree | 128c923963661e0752b11213d561b90511718401 /doc | |
| parent | 6934ba3d24d40aa9d2500999e1f912d7b49f5869 (diff) | |
Lua: Add function `pandoc.mediabag.write`.
Allows to write the complete mediabag or just a specific file to a given
directory.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lua-filters.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md index 7b2a7a111..22a3a9bbb 100644 --- a/doc/lua-filters.md +++ b/doc/lua-filters.md @@ -4179,6 +4179,26 @@ Usage: local diagram_url = "https://pandoc.org/diagram.jpg" local mt, contents = pandoc.mediabag.fetch(diagram_url) +### write {#pandoc.mediabag.write} + +`write (dir[, fp])` + +Writes the contents of mediabag to the given target directory. If +`fp` is given, then only the resource with the given name will be +extracted. Omitting that parameter means that the whole mediabag +gets extracted. An error is thrown if `fp` is given but cannot be +found in the mediabag. + +Parameters: + +`dir` +: path of the target directory (string) + +`fp` +: canonical name (relative path) of resource (string) + +Since: *3.0* + # Module pandoc.List This module defines pandoc's list type. It comes with useful |
