Edit online

Running WebHelp Responsive from Command Line

To publish to the WebHelp Responsive output from a command line outside of Oxygen XML Editor/Author, you can use the dita startup script that comes bundled with DITA Open Toolkit distribution.

dita Command Format

DITA-OT dita command has the following format:

DITA-OT-DIR/bin/dita --format=webhelp-responsive --input=input-file options

where the arguments are as follows:

dita
Windows - The dita.bat script located in: DITA-OT-DIR\bin\.
Linux/macOS - The dita script file located in: DITA-OT-DIR/bin/.
--format=webhelp-responsive
Specifies the output format (transformation type) for WebHelp Responsive transformation.
--input=input-file
The input-file represents the path to the DITA map that you want to process.
options

options include the following optional build parameters:

--output=dir
-o dir
Specifies the path of the output directory; the path can be absolute or relative to the current directory. By default, the output is written to the out subdirectory of the current directory.
--filter=file
Specifies filter file(s) used to include, exclude, or flag content.
Relative paths are resolved against the current directory and internally converted to absolute paths.
--temp=dir
-t dir
Specifies the location of the temporary directory.
--verbose
-v
Verbose logging.
--debug
-d
Debug logging.
--logfile=file
-l file
Write logging messages to a file.
--parameter=value
-Dparameter=value
Specify a value for a DITA-OT or Ant build parameter.
--propertyfile=file

Use build parameters defined in the referenced .properties file.

Build parameters specified on the command line override those set in the .properties file.

WebHelp and DITA-OT parameters

In addition to the transformation parameters that are specific to WebHelp Responsive, you can use the common DITA-OT transformation parameters and the HTML-based Output Parameters.

Command-Line Example

  • Windows:
     dita.bat 
        --format=webhelp-responsive
        --input=c:\path\to\mySample.ditamap  
        --output=c:\path\to\output 
        -Dwebhelp.logo.image=myLogo.jpg
  • Linux/macOS:
     dita
        --format=webhelp-responsive
        --input=/path/to/mySample.ditamap  
        --output=/path/to/output 
        -Dwebhelp.logo.image=myLogo.jpg
Tip: You can also start the dita process by passing it a DITA OT Project File. Inside the project file you can specify as parameters for the webhelp-responsive transformation type the WebHelp-related parameters.