I think you nailed it ;) This is safer and more reliable. May be put it somewhere as an example? (e.g. the lua filter doc.?) On Monday, November 13, 2017 at 1:19:02 AM UTC-8, albert.k...-stqabkCVF6SGlKaCpJGLJw@public.gmane.org wrote: > > Lua filters are my hammer which makes everything look like a nail, so here > is a suggestion on using those to get what you want: > > function Meta(meta) > local f = io.open(meta.metadata_file, 'r') > local content = f:read('*a') > f:close() > return pandoc.read(content).meta > end > > > Safe the above to a file and call pandoc with --lua-filter=.lua > and --metadata=metadata_file:. It will overwrite all > metadata using the contents of the yaml file. > > See also this issue: https://github.com/jgm/pandoc/issues/3115 > > On Sunday, November 12, 2017 at 10:34:02 PM UTC+1, scl...-DpHT0TjK6O80n/F98K4Iww@public.gmane.org > wrote: >> >> Hmm ok - I'll look into that :) >> >> The workflow is probably more edge case from the standard use of pandoc >> for academic writing. >> >> What we want to achieve: >> >> User -> editor of choice -> save in native format >> Apply YAML metadata with user details and extracted customer/client >> details from CRM >> Apply customised style to ensure consistency >> Apply template to ensure consistent cover page, TOC format, >> copyright/confidentiality notice, commercial in confidence footer >> >> Export to PDF for all the good reasons you use PDF for official documents >> ;) >> >> >> > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/2b1dba89-0544-49a0-954d-cad4c269fc78%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.