Output filename based on variables
Posted: Thu Jul 25, 2019 5:45 pm
I'd like to be able to set the output base filename (the part specified by args.output.base) based on the value of some variables.
In my case, the mainbooktitle in each of my bookmaps consists of three ph elements which are in turn keyref'ed, something like this:
I would like the output filename to be something like "[value of Product]_[value of Release]_[value of DocumentType].pdf".
I can think of a few complex ways of making this happen by wrapping the DITA-OT in a shell script or something similar, but I'd prefer to do it as a regular plugin, especially as I could use a regular plugin within Oxygen. Is this possible?
In my case, the mainbooktitle in each of my bookmaps consists of three ph elements which are in turn keyref'ed, something like this:
Code: Select all
<mainbooktitle>
<ph keyref="Product"/>
<ph keyref="Release"/>
<ph keyref="DocumentType/>
</mainbooktitle>
I can think of a few complex ways of making this happen by wrapping the DITA-OT in a shell script or something similar, but I'd prefer to do it as a regular plugin, especially as I could use a regular plugin within Oxygen. Is this possible?