
On 09.04.18 15:01, Andrew McGlashan via luv-main wrote:
Create documents by doing a cat of all files in a directory (for each the CV types). Pipe the output to whatever tool will process the content to product the deliverable.
And then use make to build one of any set of targets, with the actions for each target being a bunch of cats plus any postprocessing, perhaps. That puts the architecture of all the document variants in one file, in a language designed for building stuff. If current date or whatever needs to be injected, then that's just a redirection to file in an action. With the input section files as target dependencies, not only is the document build specified, but make knows to rebuild the document if any of them have changed.
The "content" files can be markdown, asciidoc or whatever you want.
Another idea would be to get creative with "tags" as part of file names for the content and use with a grep or similar on filenames to include or exclude content.
Perhaps a short awk script which reads a build-spec file, comprising a list of those tags, and scrapes each section to output in turn. If the file of tagged material were read into an associative array with the tags as subscripts, then half a dozen lines would do the job. That would require each build-spec in a separate file. Who needs to muck with yet another fandangle app and learning curve? Erik