Red Hat Bugzilla – Bug 1011904
RFE: Support multiple config files
Last modified: 2013-10-17 19:49:26 EDT
Description of problem: The topic maps currently provide a mechanism to specify parameters for the Publican config file. However, for a long time now, Publican has supported multiple config files. Platform documentation makes very heavy use of this functionality, using different config files to create the Beta and GA versions of docs; and in one case to create different books from the same set of XML files.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Try to specify more than one config file
Discover that you can't
Treat additional config files like the main publican.cfg file. Or allow config files to be supplied separately instead of autogenerating them.
Workaround is to maintain separate near-identical topic maps for each book in each of its release phases.
Added in 1.2-SNAPSHOT build 201310111650
We've added two new metadata elements for content specs.
The first is for adding the additional publican.cfg metadata, which is specified in the format "<NAME>-publican.cfg = [<CONTENT>]". eg
publican.cfg = [git_branch: rhel-6-docs
beta-publican.cfg = [condition: beta
Then there is also the "Default publican.cfg = <NAME>" metadata, which is used to specify which file to use by default when building (to save having to specify it every time you want to build). (Note: The value can either be just <NAME> or <NAME>-publican.cfg)
For assembling we've added the "--publican-config <NAME>" option in the CLI to specify to build with something other than the "Default publican.cfg" file. eg "--publican-config beta" or "--publican-config beta-publican.cfg". For the additional publican.cfg files the following will still be set/overridden when building: "brand", "xml_lang" and "type". "docname", "product" and "version" will also be added to the additional configs if they aren't set by the user. I should also mention that all config files will be included in the build no matter what value is set for "Default publican.cfg".
In the UI we've also made these fields collapsible so that they don't hinder readability too much for extremely long configs.
Tested adding new publican.cfg files to the specs, and tested collapsing them in the UI.
csprocessor preview does not seem to respect the "Default publican.cfg" setting though.
Fixed in 1.2-SNAPSHOT build 201310161156
The assemble (and therefore the preview) command wasn't using the Default publican.cfg value at all due to an issue where the command line arg was always being used. This has been updated so that the command line arg will override the content spec value, but only when specified.
This still does not appear to work. With the settings
JBoss-publican.cfg = [xml_lang: "en-US"
Default publican.cfg = JBoss
and the command
csprocessor preview 13968 -y
the final output does not display any remarks.
The above was tested with
CSProcessor client version: 1.2-SNAPSHOT, Build 20131016-1033
Ignore the above comments - my version of csprocessor was not updated.
csprocessor assemble now respects the Default publican.cfg directive.