Libre Writer from LibreOffice has an excellent mail merge feature. And an API to access most of the internal functions including mail merge.
I am looking for a bash (Linux) script that
- takes a document (.odt) and some data (.csv)
- calls the Libre Writer API (headless mode)
- performs mail merge to produce the merged document .odt (or .pdf)
- returns this document and an success status
I have been searching all of the web for such an example but there are just partial solutions (e.g. Project Gotenberg) available, no complete mail merge example.
My goal is to build a stateless Docker container to do just this mail merge process.
OpenOffice examples are welcome, too.