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 Automating Publishing Jobs for full instructions on using the Task Manager.
Technically, it is possible to include the /TSK= switch as just one switch among many in a single command line. However, there is no real benefit to this and it makes your batch files more difficult to read and debug.
Unlike other switches, the /TSK= switch can be used on its own. All you need is HM Program + Project File + /TSK. For clarity, it is really better to call this switch on its own on a single command line.
The switch can be used in INI files in the same way as other switches. Just use the syntax:
TSK=taskname:actionname
As always with INI files, don't use any quotes around the components of the line.
|
You can generate command lines for single and multiple actions from the Task Manager. Just select the actions in a task, the select the Generate Publish Batch File option to create a batch file. You can the copy the command line from that file to use it in your own manually-created batch files.
|
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"
|