You can generate output to multiple formats with the command line, either by calling publishing tasks defined in the Task Manager or by defining the output formats directly. You can also achieve this with multiple command lines stored and executed with INI and batch files.
HELPMAN.EXE <path>\projectfile.hmxz /TSK="taskname:actionname" /TSK="taskname:actionname"...
HELPMAN.EXE <path>\projectfile.hmxz /<format1> /<switches> /<format2> /<switches> ...
Each format switch must be directly followed by all the switches you want to apply to that format. Each format must have its own set of switches, they are not applied to multiple formats.
The easiest way to publish to multiple output formats from the command line is to call predefined publishing tasks created with the Publishing Task Manager using the /TSK= switch. See Publishing Tasks - Automation for full instructions on using the Task Manager.
Although it is possible to mix the /TSK= switch with other switches it is easier to manage if you call publishing tasks on individual lines of their own. Unlike other switches, all you need for this switch is the HELPMAN.EXE filename, the project filename and the /TSK= switch with the task and action names. Publishing all the actions in a task:To publish all the actions in a task just include the task name on its own, like this: HELPMAN.EXE D:\Projects\widgets.hmxp /TSK="Daily Build" Publishing single actions in a task:To publish a single actions in a task add the name of the action after the name of the task, separated by a colon (:) character: HELPMAN.EXE D:\Projects\widgets.hmxp /TSK="Daily Build:Full CHM Output" Publishing multiple selected actions in a task:To publish a multiple (but not all) actions in a task use the /TSK= switch multiple times, once for each action. Alternatively, you can also write separate command lines for each action if you like. The result will be the same. HELPMAN.EXE D:\Projects\widgets.hmxp /TSK="Daily Build:Full CHM Output" /TSK="Daily Build:Full HTML Output" |
Local and Global Switches for Multiple Output |
||||||||||||||||
Local switches The following switches are "local". They must be applied to each output format individually by inserting them after the format switch for which they should apply and before the next format switch.
Global switches These switches can only be used once per command line and they apply from the point in the command line at which they are inserted.
If you have multiple output formats in a single command line you must insert these switches directly after the first output format to apply them to all output formats. To apply them only to some output formats insert the switches after the first output format for which you wish them to apply. Examples: 1) helpman.exe project.hmxz /CHM /keeptemp /EPUB 2) helpman.exe project.hmxp /CHM /EPUB /keeptemp Example 1) above keeps the temporary files for both the CHM and EPUB output. Example 2) only keeps the temporary files for the CHM output. The same applies for log files and debug information. See Syntax reference for more information on the individual switches and parameters. |
Example 1:The following example compiles a project file to HTML Help and PDF, using conditional output include options for the HTML Help file and selecting a specific PDF print manual template for the PDF output file. The template is assumed to be in the project directory; if it is stored somewhere else you must include its path. HELPMAN.EXE D:\Projects\widget.hmxz /CHM=widgethelp.chm /I=CHM,DEMO /PDF=manual.pdf /Template=manual.mnl Example 2:The following example compiles to CHM and WebHelp using include options. HELPMAN.EXE D:\Projects\widget.hmxp /CHM=D:\CHM\widget.chm /I=CHM,FINAL /HTML=D:\HTML\index.html /I=HTML,FINAL |
See also: