1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
tex-template-builder/word-count.lua

9 lines
248 B
Lua

return {
{
Meta = function(meta)
local rawText = pandoc.pipe("pdftotext", {os.getenv("OUTPUT_FILE"), "-"}, "")
meta["wordcount"] = pandoc.pipe("wc", {"-w"}, rawText)
return meta
end,
},
}