dita-command-arguments.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. <!DOCTYPE html
  2. SYSTEM "about:legacy-compat">
  3. <html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2019"><meta name="DC.rights.owner" content="(C) Copyright 2019"><meta name="DC.type" content="reference"><meta name="description" content="The dita command takes mandatory arguments to process DITA content, manage plug-ins, or print information about the command. Options can be used to modify the command behavior or specify additional configuration parameters."><meta name="DC.subject" content="filters, command, dita, arguments list, arguments, installing, uninstalling, artlbl, args.artlbl"><meta name="keywords" content="filters, command, dita, arguments list, arguments, installing, uninstalling, artlbl, args.artlbl"><meta name="DC.relation" scheme="URI" content="../parameters/index.html"><meta name="DC.relation" scheme="URI" content="../topics/build-using-dita-command.html"><meta name="DC.relation" scheme="URI" content="../parameters/parameters_intro.html"><meta name="DC.relation" scheme="URI" content="../parameters/internal-ant-properties.html"><meta name="DC.relation" scheme="URI" content="../topics/using-dita-properties-file.html"><meta name="DC.format" content="HTML5"><meta name="DC.identifier" content="dita-command-properties"><meta name="DC.language" content="en"><link rel="stylesheet" type="text/css" href="../css/commonltr.css"><link rel="stylesheet" type="text/css" href="../css/dita-ot-doc.css"><title>Arguments and options for the dita command</title></head><body id="dita-command-properties"><header role="banner"><div class="header">
  4. <p>DITA Open Toolkit</p>
  5. <hr>
  6. </div></header><nav role="toc"><ul><li><a href="../index.html">DITA Open Toolkit 3.3</a></li><li><a href="../release-notes/index.html">Release Notes</a></li><li><a href="../topics/installing-client.html">Installing DITA-OT</a></li><li><a href="../topics/alternative-input-formats.html">Authoring formats</a></li><li><a href="../topics/building-output.html">Building output</a></li><li><a href="../parameters/index.html">Setting parameters</a><ul><li class="active"><a href="../parameters/dita-command-arguments.html">DITA command arguments</a></li><li><a href="../parameters/parameters_intro.html">DITA-OT parameters</a></li><li><a href="../parameters/configuration-properties.html">Configuration properties</a></li></ul></li><li><a href="../topics/customizing.html">Customizing DITA-OT</a></li><li><a href="../topics/troubleshooting-overview.html">Troubleshooting</a></li><li><a href="../reference/index.html">Reference</a></li><li><a href="../topics/dita-and-dita-ot-resources.html">Resources</a></li></ul></nav><main role="main"><article role="article" aria-labelledby="ariaid-title1">
  7. <h1 class="title topictitle1" id="ariaid-title1">Arguments and options for the <span class="keyword cmdname">dita</span> command</h1>
  8. <div class="body refbody"><p class="shortdesc">The <span class="keyword cmdname">dita</span> command takes mandatory arguments to process DITA content, manage plug-ins, or
  9. print information about the command. Options can be used to modify the command behavior or specify additional
  10. configuration parameters.</p>
  11. <section class="section"><h2 class="title sectiontitle">Usage</h2>
  12. <div style="display: block; border: 1 black solid; padding: 2pt; color: maroon; margin-bottom: 6pt;">
  13. <div><a name=""></a>
  14. <blockquote>
  15. <kbd><b>dita</b></kbd>
  16. <kbd><b>--input</b></kbd><kbd class="ph oper">=</kbd>
  17. <var>file</var>
  18. <kbd><b>--format</b></kbd><kbd class="ph oper">=</kbd>
  19. <var>name</var>
  20. [
  21. <var>options</var>
  22. ]
  23. </blockquote>
  24. </div>
  25. <div><a name=""></a>
  26. <blockquote>
  27. <kbd><b>dita</b></kbd>
  28. <kbd><b>--install</b></kbd><kbd class="ph oper">=</kbd>
  29. [ {
  30. <var>filename</var>
  31. <var> | URL</var>
  32. } ]
  33. </blockquote>
  34. </div>
  35. <div><a name=""></a>
  36. <blockquote>
  37. <kbd><b>dita</b></kbd>
  38. <kbd><b>--uninstall</b></kbd><kbd class="ph oper">=</kbd>
  39. <var>id</var>
  40. </blockquote>
  41. </div>
  42. <div><a name=""></a>
  43. <blockquote>
  44. <kbd><b>dita</b></kbd>
  45. <kbd><b>--help</b></kbd>
  46. </blockquote>
  47. </div>
  48. <div><a name=""></a>
  49. <blockquote>
  50. <kbd><b>dita</b></kbd>
  51. <kbd><b>--version</b></kbd>
  52. </blockquote>
  53. </div>
  54. </div>
  55. <div class="note note note_note"><span class="note__title">Note:</span> Most <span class="keyword cmdname">dita</span> command options support several syntax alternatives. All options can be
  56. specified with a GNU-style option keyword preceded by two hyphens. In many cases, Unix-style single-letter
  57. options (preceded by a single hyphen) are also available for backwards compatibility.</div>
  58. </section>
  59. <section class="section"><h2 class="title sectiontitle">Arguments</h2>
  60. <div class="div div-index">
  61. </div>
  62. <dl class="dl parml">
  63. <dt class="dt pt dlterm">
  64. <span class="keyword parmname">--input</span>=<var class="keyword varname">file</var></dt>
  65. <dt class="dt pt dlterm">
  66. <span class="keyword parmname">-i</span>
  67. <var class="keyword varname">file</var>
  68. </dt>
  69. <dd class="dd pd" id="dita-command-properties__args.input.desc">Specifies the master file for your documentation project. This argument corresponds
  70. to the common parameter <span class="keyword parmname">args.input</span>. Typically this is a DITA map, however it also can
  71. be a DITA topic if you want to transform a single DITA file. The path can be absolute, relative to
  72. <span class="keyword parmname">args.input.dir</span>, or relative to the current directory if
  73. <span class="keyword parmname">args.input.dir</span> is not defined.</dd>
  74. <dt class="dt pt dlterm">
  75. <span class="keyword parmname">--format</span>=<var class="keyword varname">name</var></dt>
  76. <dt class="dt pt dlterm">
  77. <span class="keyword parmname">-f</span>
  78. <var class="keyword varname">name</var>
  79. </dt>
  80. <dd class="dd pd">Specifies the output format (transformation type).</dd>
  81. <dd class="dd pd ddexpand">This argument corresponds to the common parameter <span class="keyword parmname">transtype</span>.</dd>
  82. <dd class="dd pd ddexpand">To list the formats that are currently available in your environment, use <span class="keyword cmdname">dita</span>
  83. <span class="keyword parmname">--transtypes</span>.</dd>
  84. <dd class="dd pd ddexpand">
  85. <div class="p">You can create plug-ins to add new output formats; by default, the following values are
  86. available:
  87. <ul class="ul">
  88. <li class="li"><span class="keyword option">dita</span></li>
  89. <li class="li"><span class="keyword option">eclipsehelp</span></li>
  90. <li class="li"><span class="keyword option">html5</span></li>
  91. <li class="li"><span class="keyword option">htmlhelp</span></li>
  92. <li class="li"><span class="keyword option">markdown</span>, <span class="keyword option">markdown_gitbook</span>, and
  93. <span class="keyword option">markdown_github</span></li>
  94. <li class="li"><span class="keyword option">pdf</span></li>
  95. <li class="li"><span class="keyword option">tocjs</span></li>
  96. <li class="li"><span class="keyword option">troff</span></li>
  97. <li class="li"><span class="keyword option">xhtml</span></li>
  98. </ul>
  99. <div class="note tip note_tip"><span class="note__title">Tip:</span> See <a class="xref" href="../resources/../topics/output-formats.html" title="DITA Open Toolkit ships with several core transformations that generate different output formats from DITA content. Each transformation represents an implementation of the processing that is defined by OASIS in the DITA specification.">DITA-OT transformations (output formats)</a> for sample command line syntax and more information
  100. on each transformation.
  101. </div>
  102. </div>
  103. </dd>
  104. <dt class="dt pt dlterm">
  105. <span class="keyword parmname">--install</span>=<var class="keyword varname">filename</var></dt>
  106. <dt class="dt pt dlterm">
  107. <span class="keyword parmname">--install</span>=<var class="keyword varname">URL</var></dt>
  108. <dd class="dd pd">Install a single plug-in from a local ZIP file or from a URL.</dd>
  109. <dt class="dt pt dlterm">
  110. <span class="keyword parmname">--install</span>
  111. </dt>
  112. <dd class="dd pd"><span class="ph">If no <var class="keyword varname">filename</var> or <var class="keyword varname">URL</var> argument is
  113. provided, the installation process reloads the current set of plug-ins from the
  114. <span class="ph filepath">plugins</span> directory. This approach can be used to add or remove multiple plug-ins
  115. at once, or any individual plug-ins you have already copied to (or removed from) the
  116. <span class="ph filepath">plugins</span> directory. Any plug-ins added or removed in the process will be listed by
  117. their plug-in ID.</span></dd>
  118. <dt class="dt pt dlterm">
  119. <span class="keyword parmname">--uninstall</span>=<var class="keyword varname">id</var>
  120. </dt>
  121. <dd class="dd pd">
  122. <p class="p">Remove the plug-in with the specified ID.</p>
  123. </dd>
  124. <dd class="dd pd ddexpand">For a list of the currently installed plug-in IDs, use <span class="keyword cmdname">dita</span>
  125. <span class="keyword parmname">--plugins</span>.</dd>
  126. <dd class="dd pd ddexpand">
  127. <div class="note attention note_attention"><span class="note__title">Attention:</span> The <span class="keyword parmname">--uninstall</span> option also
  128. removes the corresponding subdirectory from the <span class="ph filepath">plugins</span>
  129. folder.</div>
  130. </dd>
  131. <dt class="dt pt dlterm">
  132. <span class="keyword parmname">--plugins</span>
  133. </dt>
  134. <dd class="dd pd">Show a list of the currently installed plug-ins.</dd>
  135. <dt class="dt pt dlterm">
  136. <span class="keyword parmname">--transtypes</span>
  137. </dt>
  138. <dd class="dd pd">Show a list of the available output formats (transformation types).</dd>
  139. <dd class="dd pd ddexpand">The entries in this list may be passed as values to the <span class="keyword parmname">--format</span> argument.</dd>
  140. <dt class="dt pt dlterm">
  141. <span class="keyword parmname">--help</span></dt>
  142. <dt class="dt pt dlterm">
  143. <span class="keyword parmname">-h</span>
  144. </dt>
  145. <dd class="dd pd">Print command usage help.</dd>
  146. <dt class="dt pt dlterm">
  147. <span class="keyword parmname">--version</span>
  148. </dt>
  149. <dd class="dd pd">Print version information and exit.</dd>
  150. </dl>
  151. </section>
  152. <section class="section"><h2 class="title sectiontitle">Options</h2>
  153. <div class="div div-index">
  154. </div>
  155. <dl class="dl parml" id="dita-command-properties__dita_build_options">
  156. <dt class="dt pt dlterm">
  157. <span class="keyword parmname">--output</span>=<var class="keyword varname">dir</var></dt>
  158. <dt class="dt pt dlterm">
  159. <span class="keyword parmname">-o</span>
  160. <var class="keyword varname">dir</var>
  161. </dt>
  162. <dd class="dd pd" id="dita-command-properties__output.dir.desc">
  163. <p class="p">Specifies the path of the output directory; the path can be absolute or relative to the current
  164. directory.</p>
  165. <p class="p">This argument corresponds to the common parameter <span class="keyword parmname">output.dir</span>. By default, the output
  166. is written to the <span class="ph filepath">out</span> subdirectory of the current directory.</p>
  167. </dd>
  168. <dt class="dt pt dlterm">
  169. <span class="keyword parmname">--filter</span>=<var class="keyword varname">files</var>
  170. </dt>
  171. <dd class="dd pd">Specifies filter file(s) used to include, exclude, or flag content. </dd>
  172. <dd class="dd pd ddexpand">
  173. <p class="p">This argument corresponds to the common parameter <span class="keyword parmname">args.filter</span>. Relative paths are
  174. resolved against the current directory and internally converted to absolute paths.</p>
  175. <div class="note note note_note"><span class="note__title">Note:</span>
  176. <p class="p">To specify multiple filter files, use the system path separator character to delimit individual file
  177. paths (semicolon ‘<code class="ph codeph">;</code>’ on Windows, and colon ‘<code class="ph codeph">:</code>’ on macOS and Linux) and
  178. wrap the value in quotes:</p>
  179. <p class="p"><code class="ph codeph">--filter="filter1.ditaval;filter2.ditaval;filter3.ditaval"</code></p>
  180. <p class="p">DITAVAL files are evaluated in the order specified, so conditions specified in the first file take
  181. precedence over matching conditions specified in later files, just as conditions at the start of a
  182. DITAVAL document take precedence over matching conditions later in the same document.</p>
  183. </div>
  184. </dd>
  185. <dt class="dt pt dlterm">
  186. <span class="keyword parmname">--force</span>
  187. </dt>
  188. <dd class="dd pd">Force-install an existing plug-in.</dd>
  189. <dd class="dd pd ddexpand">Passed as an additional option to the installation command:
  190. <span class="keyword cmdname">dita</span>&nbsp;<span class="keyword parmname">--install</span>=<var class="keyword varname">plug-in-zip</var>&nbsp;<span class="keyword parmname">--force</span></dd>
  191. <dt class="dt pt dlterm">
  192. <span class="keyword parmname">--temp</span>=<var class="keyword varname">dir</var></dt>
  193. <dt class="dt pt dlterm">
  194. <span class="keyword parmname">-t</span>
  195. <var class="keyword varname">dir</var>
  196. </dt>
  197. <dd class="dd pd">Specifies the location of the temporary directory.</dd>
  198. <dd class="dd pd ddexpand">This argument corresponds to the common parameter <span class="keyword parmname">dita.temp.dir</span>.</dd>
  199. <dt class="dt pt dlterm">
  200. <span class="keyword parmname">--verbose</span></dt>
  201. <dt class="dt pt dlterm">
  202. <span class="keyword parmname">-v</span>
  203. </dt>
  204. <dd class="dd pd">Verbose logging prints additional information to the console, including directory settings, effective
  205. values for Ant properties, input/output files, and informational messages to assist in troubleshooting.</dd>
  206. <dt class="dt pt dlterm">
  207. <span class="keyword parmname">--debug</span></dt>
  208. <dt class="dt pt dlterm">
  209. <span class="keyword parmname">-d</span>
  210. </dt>
  211. <dd class="dd pd">Debug logging prints considerably more additional information. The debug log includes all information from
  212. the verbose log, plus details on Java classes, additional Ant properties and overrides, preprocessing
  213. filters, parameters, and stages, and the complete build sequence. Debug logging requires additional
  214. resources and can slow down the build process, so it should only be enabled when further details are
  215. required to diagnose problems.</dd>
  216. <dt class="dt pt dlterm">
  217. <span class="keyword parmname">--logfile</span>=<var class="keyword varname">file</var></dt>
  218. <dt class="dt pt dlterm">
  219. <span class="keyword parmname">-l</span>
  220. <var class="keyword varname">file</var>
  221. </dt>
  222. <dd class="dd pd">Write logging messages to a file.</dd>
  223. <dt class="dt pt dlterm">
  224. <span class="keyword parmname">--parameter</span>=<var class="keyword varname">value</var></dt>
  225. <dt class="dt pt dlterm">
  226. <span class="keyword parmname">-D</span><var class="keyword varname">parameter</var>=<var class="keyword varname">value</var>
  227. </dt>
  228. <dd class="dd pd">Specify a value for a DITA-OT or Ant build parameter.
  229. <p class="p">The GNU-style <span class="keyword parmname">--parameter</span>=<var class="keyword varname">value</var> form is only available for
  230. parameters that are configured in the plug-in configuration file; the Java-style <span class="keyword parmname">-D</span>
  231. form can also be used to specify additional non-configured parameters or set system properties.</p>
  232. <p class="p">Parameters not implemented by the specified transformation type or referenced in a
  233. <span class="ph filepath">.properties</span> file are ignored.</p><div class="note tip note_tip"><span class="note__title">Tip:</span> If you are building in different environments where the location of the input
  234. files is not consistent, set <span class="keyword option">args.input.dir</span> with the <span class="keyword cmdname">dita</span> command and
  235. reference its value with <code class="ph codeph">${args.input.dir}</code> in your <span class="ph filepath">.properties</span>
  236. file.
  237. </div></dd>
  238. <dt class="dt pt dlterm">
  239. <span class="keyword parmname">--propertyfile</span>=<var class="keyword varname">file</var>
  240. </dt>
  241. <dd class="dd pd">Use build parameters defined in the referenced <span class="ph filepath">.properties</span> file.
  242. <p class="p">Build parameters specified on the command line override those set in the <span class="ph filepath">.properties</span>
  243. file.</p></dd>
  244. </dl>
  245. </section>
  246. </div>
  247. <nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../parameters/index.html" title="You can adjust DITA Open Toolkit behavior via dita command arguments and options, DITA-OT parameter settings, and configuration properties.">Setting DITA Open Toolkit parameters</a></div></div><div class="linklist relinfo reltasks"><strong>Related tasks</strong><br><ul class="linklist"><li class="linklist"><a class="link" href="../topics/build-using-dita-command.html" title="You can generate output using the dita command-line tool. Build parameters can be specified on the command line or with .properties files.">Building output using the dita command</a></li><li class="linklist"><a class="link" href="../topics/using-dita-properties-file.html" title="Usually, DITA builds require setting a number of parameters that do not change frequently. You can reference a set of build parameters defined in a .properties file when building output with the dita command. If needed, you can override any parameter by specifying it explicitly as an argument to the dita command.">Setting build parameters with .properties files</a></li></ul></div><div class="linklist relinfo relref"><strong>Related reference</strong><br><ul class="linklist"><li class="linklist"><a class="link" href="../parameters/parameters_intro.html" title="Certain parameters apply to all DITA-OT transformations. Other parameters are common to the HTML-based transformations. Some parameters apply only to specific transformation types. These parameters can be passed as options to the dita command using the --parameter=value syntax or included in build scripts as Ant properties.">DITA-OT parameters</a></li><li class="linklist"><a class="link" href="../parameters/internal-ant-properties.html" title="Reference list of Ant properties used by DITA-OT internally.">Internal Ant properties</a></li></ul></div></nav></article></main></body></html>