简体   繁体   中英

Pandoc Lua filter get filename of current document

I'm writing a Lua filter which need to utilize the filename of the document which is being processed, is this possible to do?

Lua filter:

local handle = io.popen("git log FILE")
local log = handle:read("*a")
handle:close()

In the above I need to use the actual filename of the document being processed to get the log for that specific file to include in the output document.

PANDOC_STATE.input_files is a List of strings with the input files provided through the command line.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM