Commit graph

17 commits

Author SHA1 Message Date
John MacFarlane
8768f7e5b0 Lua: use sha1 instead of hashname.
Better to leave control over the extension to the user.
2017-09-30 23:15:43 -07:00
John MacFarlane
9451d83058 Lua: make fetch return mime type first and then content. 2017-09-30 23:00:14 -07:00
John MacFarlane
17583cd99d Lua: simply mediabag module.
Now 'fetch' simply fetches content and mime type.
A new 'hashname' function is provided to get a filename based
on the sha1 hash of the contents and the mime type.
2017-09-30 22:54:12 -07:00
John MacFarlane
73c47a44d8 Lua: make lua.mediabag.fetch return filename and mime type.
This is necessary because you may need to insert the filename
into an image or link element.
2017-09-30 21:58:35 -07:00
John MacFarlane
9b7d652ab7 Merge pull request #3945 from tarleb/lua-mediabag
Lua mediabag module
2017-09-30 10:50:02 -04:00
Albert Krewinkel
c363519302 Provide make target to update lua module docs (#3946)
The pandoc module documentation in doc/lua-filters.md was automatically
generated from `data/pandoc.lua`.  A make target is provided which uses
a lua filter to update the documentation.
2017-09-30 10:45:31 -04:00
Albert Krewinkel
53b6ffe9b8
doc/lua-filters.md: document mediabag submodule 2017-09-30 15:09:24 +02:00
John MacFarlane
9a47c7863b Lua filters: set global FORMAT instead of args.
This changes the type of runLuaFilter.
2017-09-26 20:20:09 -07:00
Albert Krewinkel
2d416e203e Document possible return values of lua filter functions
This is mostly copy'n'pasted from the pandocfilters documentation.
2017-09-24 12:04:15 -07:00
Albert Krewinkel
79b1a701b8
lua-filters.md: append docs for pandoc's lua module
The documentation was generated from `data/pandoc.lua` using the
following command:

    ldoc -l doc -d /tmp data/pandoc.lua;
    pandoc -t markdown --columns=65 \
           --atx-headers /tmp/index.html >> \
           doc/lua-filters.md
2017-08-31 16:57:14 +02:00
Albert Krewinkel
9ada1defb5
Document fallback functions in lua filters 2017-08-30 15:09:54 +02:00
John MacFarlane
f2dfb3f23b Added introduction and lightly edited rest of lua-filters document.
See #3608.
2017-08-21 22:14:26 -07:00
Albert Krewinkel
4567105f6c
doc/lua-filter.md: Add metadata variable replacment example 2017-08-21 19:00:51 +02:00
Albert Krewinkel
29a6793811
lua-filters.md: update docs and mention implicit filters 2017-08-21 16:53:00 +02:00
John MacFarlane
64ff86514b Added example of setting date with lua filter. 2017-08-14 09:57:01 -07:00
John MacFarlane
c505de59c0 Added link-table example to doc/lua-filters.md. 2017-06-28 15:31:42 +02:00
Albert Krewinkel
1afdccfa8c
Document lua filters 2017-04-30 15:55:45 +02:00