From bd3ea723717b54e3853487bee7a48947fb73b68a Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Thu, 21 Dec 2017 22:30:59 +0100 Subject: Lua modules: added pandoc.utils module A new module `pandoc.utils` has been created. It holds utility functions like `sha1`, which was moved from the main `pandoc` module. --- doc/lua-filters.md | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'doc') diff --git a/doc/lua-filters.md b/doc/lua-filters.md index 9beeda185..a109871f6 100644 --- a/doc/lua-filters.md +++ b/doc/lua-filters.md @@ -1405,18 +1405,6 @@ Lua functions for pandoc scripts. -- the above is equivallent to -- return {{Str = Str}} -[`sha1 (contents)`]{#mediabag-sha1} - -: Returns the SHA1 has of the contents. - - Returns: - - - SHA1 hash of the contents. - - Usage: - - local fp = pandoc.mediabag.sha1("foobar") - [`pipe (command, args, input)`]{#mediabag-sha1} : Runs command with arguments, passing it some input, @@ -1436,9 +1424,28 @@ Lua functions for pandoc scripts. local output = pandoc.pipe("sed", {"-e","s/a/b/"}, "abc") -# Submodule mediabag -The submodule `mediabag` allows accessing pandoc's media +# Module pandoc.utils + +This module exposes internal pandoc functions and utility +functions. + +[`sha1 (contents)`]{#utils-sha1} + +: Returns the SHA1 has of the contents. + + Returns: + + - SHA1 hash of the contents. + + Usage: + + local fp = pandoc.utils.sha1("foobar") + + +# Module pandoc.mediabag + +The `pandoc.mediabag` module allows accessing pandoc's media storage. The "media bag" is used when pandoc is called with the `--extract-media` or `--standalone`/`-s` option. -- cgit v1.2.3