dita-command-arguments.dita 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
  3. <!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
  4. <reference id="dita-command-properties" xml:lang="en">
  5. <title>Arguments and options for the <cmdname>dita</cmdname> command</title>
  6. <titlealts>
  7. <navtitle>DITA command arguments</navtitle>
  8. </titlealts>
  9. <shortdesc>The <cmdname>dita</cmdname> command takes mandatory arguments to process DITA content. Subcommands can be
  10. used to manage plug-ins, or print information about the current configuration. A series of options are available to
  11. modify the command behavior or specify additional configuration parameters.</shortdesc>
  12. <prolog>
  13. <metadata>
  14. <keywords>
  15. <indexterm>filters
  16. <indexterm><cmdname>dita</cmdname> command</indexterm></indexterm>
  17. <indexterm><cmdname>dita</cmdname> command
  18. <indexterm>arguments list</indexterm></indexterm>
  19. <indexterm>arguments
  20. <index-see-also><cmdname>dita</cmdname> command</index-see-also></indexterm>
  21. <indexterm>installing</indexterm>
  22. <indexterm>uninstalling</indexterm>
  23. <indexterm>artlbl
  24. <index-see>args.artlbl</index-see></indexterm>
  25. </keywords>
  26. </metadata>
  27. </prolog>
  28. <refbody>
  29. <section>
  30. <title>Usage</title>
  31. <p>To convert content from one format to another, specify the file to transform and the desired output format. If
  32. necessary, you can set additional configuration parameters with options.</p>
  33. <syntaxdiagram>
  34. <fragment>
  35. <groupseq>
  36. <kwd>dita</kwd>
  37. <kwd>--input</kwd>
  38. <oper>=</oper>
  39. <var>file</var>
  40. <kwd>--format</kwd>
  41. <oper>=</oper>
  42. <var>name</var>
  43. <groupcomp importance="optional">
  44. <var>options</var>
  45. </groupcomp>
  46. </groupseq>
  47. </fragment>
  48. <fragment>
  49. <groupseq>
  50. <kwd>dita</kwd>
  51. <kwd>--project</kwd>
  52. <oper>=</oper>
  53. <var>file</var>
  54. <groupcomp importance="optional">
  55. <var>options</var>
  56. </groupcomp>
  57. </groupseq>
  58. </fragment>
  59. </syntaxdiagram>
  60. <note>Most <cmdname>dita</cmdname> command options support several syntax alternatives. All options can be
  61. specified with a GNU-style option keyword preceded by two hyphens. In many cases, Unix-style single-letter
  62. options (preceded by a single hyphen) are also available for brevity and backwards compatibility.</note>
  63. <p>The <cmdname>dita</cmdname> command also supports a series of subcommands that can be used to manage plug-ins,
  64. or print information about the current configuration or version.</p>
  65. <syntaxdiagram>
  66. <fragment>
  67. <groupseq>
  68. <kwd>dita</kwd>
  69. <kwd>deliverables</kwd>
  70. <var>file</var>
  71. </groupseq>
  72. </fragment>
  73. <fragment>
  74. <groupseq>
  75. <kwd>dita</kwd>
  76. <kwd>install</kwd>
  77. <groupchoice importance="optional">
  78. <var>ID</var>
  79. <var>URL</var>
  80. <var>file</var>
  81. </groupchoice>
  82. </groupseq>
  83. </fragment>
  84. <fragment>
  85. <groupseq>
  86. <kwd>dita</kwd>
  87. <kwd>plugins</kwd>
  88. </groupseq>
  89. </fragment>
  90. <fragment>
  91. <groupseq>
  92. <kwd>dita</kwd>
  93. <kwd>transtypes</kwd>
  94. </groupseq>
  95. </fragment>
  96. <fragment>
  97. <groupseq>
  98. <kwd>dita</kwd>
  99. <kwd>uninstall</kwd>
  100. <var>ID</var>
  101. </groupseq>
  102. </fragment>
  103. <fragment>
  104. <groupseq>
  105. <kwd>dita</kwd>
  106. <kwd>version</kwd>
  107. </groupseq>
  108. </fragment>
  109. </syntaxdiagram>
  110. <note type="attention">Prior to DITA-OT 3.5, subcommands were specified with the double-hyphen option syntax,
  111. which is still supported for backwards compatibility. (For example, <cmdname>dita</cmdname>
  112. <parmname>--install</parmname> will still work.)</note>
  113. </section>
  114. <section>
  115. <title>Arguments</title>
  116. <indexterm><parmname>--input</parmname></indexterm>
  117. <indexterm><parmname>-i</parmname></indexterm>
  118. <indexterm><parmname>--format</parmname></indexterm>
  119. <indexterm><parmname>-f</parmname></indexterm>
  120. <p>Each transformation requires you to specify at least the file to transform and the desired output format.</p>
  121. <parml>
  122. <plentry>
  123. <pt>
  124. <parmname>--input</parmname>=<varname>file</varname></pt>
  125. <pt>
  126. <parmname>-i</parmname>
  127. <varname>file</varname>
  128. </pt>
  129. <pd id="args.input.desc">Specifies the master file for your documentation project. This argument corresponds
  130. to the common parameter <parmname>args.input</parmname>. Typically this is a DITA map, however it also can
  131. be a DITA topic if you want to transform a single DITA file. The path can be absolute, relative to
  132. <parmname>args.input.dir</parmname>, or relative to the current directory if
  133. <parmname>args.input.dir</parmname> is not defined.</pd>
  134. </plentry>
  135. <plentry>
  136. <pt>
  137. <parmname>--format</parmname>=<varname>name</varname></pt>
  138. <pt>
  139. <parmname>-f</parmname>
  140. <varname>name</varname>
  141. </pt>
  142. <pd conkeyref="parameters-base/transtype.desc"/>
  143. <pd>This argument corresponds to the common parameter <parmname>transtype</parmname>.</pd>
  144. <pd>To list the formats that are currently available in your environment, use <cmdname>dita
  145. transtypes</cmdname>.</pd>
  146. <pd>
  147. <p conkeyref="conref-task/transtypes"/>
  148. </pd>
  149. </plentry>
  150. </parml>
  151. </section>
  152. <section>
  153. <title>Subcommands</title>
  154. <indexterm><cmdname>deliverables</cmdname> subcommand</indexterm>
  155. <indexterm><cmdname>install</cmdname> subcommand</indexterm>
  156. <indexterm><parmname>--install</parmname>
  157. <index-see><cmdname>install</cmdname> subcommand</index-see></indexterm>
  158. <indexterm><cmdname>uninstall</cmdname> subcommand</indexterm>
  159. <indexterm><parmname>--uninstall</parmname>
  160. <index-see><cmdname>uninstall</cmdname> subcommand</index-see></indexterm>
  161. <indexterm><cmdname>plugins</cmdname> subcommand</indexterm>
  162. <indexterm><parmname>--plugins</parmname>
  163. <index-see><cmdname>plugins</cmdname> subcommand</index-see></indexterm>
  164. <indexterm><cmdname>transtypes</cmdname> subcommand</indexterm>
  165. <indexterm><parmname>--transtypes</parmname>
  166. <index-see><cmdname>transtypes</cmdname> subcommand</index-see></indexterm>
  167. <indexterm><parmname>--help</parmname></indexterm>
  168. <indexterm><parmname>-h</parmname></indexterm>
  169. <indexterm><cmdname>version</cmdname> subcommand</indexterm>
  170. <indexterm><parmname>--version</parmname>
  171. <index-see><cmdname>version</cmdname> subcommand</index-see></indexterm>
  172. <parml>
  173. <plentry>
  174. <pt>
  175. <parmname>deliverables</parmname>
  176. <varname>file</varname></pt>
  177. <pd>Show a list of the available deliverables in the specified project <varname>file</varname>.</pd>
  178. </plentry>
  179. <plentry>
  180. <pt>
  181. <parmname>install</parmname>
  182. <varname>{ ID | URL | file }</varname></pt>
  183. <pt>
  184. <parmname>--install</parmname>=<varname>{ ID | URL | file }</varname></pt>
  185. <pd>Install a single plug-in <varname>ID </varname>from the registry at
  186. <xref keyref="site-plugin-registry"/> (or a local registry), from a remote <varname>URL</varname>, or a
  187. local ZIP <varname>file</varname>.</pd>
  188. </plentry>
  189. <plentry>
  190. <pt>
  191. <parmname>install</parmname>
  192. </pt>
  193. <pt>
  194. <parmname>--install</parmname>
  195. </pt>
  196. <pd><ph conkeyref="conref-task/plugin-integrate-all"/></pd>
  197. </plentry>
  198. <plentry>
  199. <pt>
  200. <parmname>uninstall</parmname>
  201. <varname>ID</varname>
  202. </pt>
  203. <pt>
  204. <parmname>--uninstall</parmname>=<varname>ID</varname>
  205. </pt>
  206. <pd>
  207. <p>Remove the plug-in with the specified <varname>ID</varname>.</p>
  208. </pd>
  209. <pd>For a list of the currently installed plug-in IDs, use <cmdname>dita plugins</cmdname>.</pd>
  210. <pd>
  211. <note conkeyref="conref-task/plugin-remove-subdir"/>
  212. </pd>
  213. </plentry>
  214. <plentry>
  215. <pt>
  216. <parmname>plugins</parmname>
  217. </pt>
  218. <pt>
  219. <parmname>--plugins</parmname>
  220. </pt>
  221. <pd>Show a list of the currently installed plug-ins.</pd>
  222. </plentry>
  223. <plentry>
  224. <pt>
  225. <parmname>transtypes</parmname>
  226. </pt>
  227. <pt>
  228. <parmname>--transtypes</parmname>
  229. </pt>
  230. <pd>Show a list of the available output formats (transformation types).</pd>
  231. <pd>The entries in this list may be passed as values to the <parmname>--format</parmname> argument.</pd>
  232. </plentry>
  233. <plentry>
  234. <pt>
  235. <parmname>version</parmname>
  236. </pt>
  237. <pt>
  238. <parmname>--version</parmname>
  239. </pt>
  240. <pd>Print version information and exit.</pd>
  241. </plentry>
  242. </parml>
  243. </section>
  244. <section>
  245. <title>Options</title>
  246. <indexterm><parmname>-o</parmname></indexterm>
  247. <indexterm><parmname>--output</parmname></indexterm>
  248. <indexterm><parmname>--filter</parmname></indexterm>
  249. <indexterm><parmname>--force</parmname></indexterm>
  250. <indexterm><parmname>--temp</parmname></indexterm>
  251. <indexterm><parmname>-t</parmname></indexterm>
  252. <indexterm><parmname>--verbose</parmname></indexterm>
  253. <indexterm><parmname>-v</parmname></indexterm>
  254. <indexterm><parmname>--debug</parmname></indexterm>
  255. <indexterm><parmname>-d</parmname></indexterm>
  256. <indexterm><parmname>--logfile</parmname></indexterm>
  257. <indexterm><parmname>-l</parmname></indexterm>
  258. <indexterm><parmname>--parameter</parmname></indexterm>
  259. <indexterm><parmname>-D</parmname></indexterm>
  260. <indexterm><parmname>--propertyfile</parmname></indexterm>
  261. <indexterm>Java
  262. <indexterm>classes</indexterm></indexterm>
  263. <indexterm>debugging
  264. <indexterm><cmdname>dita</cmdname> command</indexterm></indexterm>
  265. <parml id="dita_build_options">
  266. <plentry>
  267. <pt>
  268. <parmname>--debug</parmname></pt>
  269. <pt>
  270. <parmname>-d</parmname>
  271. </pt>
  272. <pd>Debug logging prints considerably more additional information. The debug log includes all information from
  273. the verbose log, plus details on Java classes, additional Ant properties and overrides, preprocessing
  274. filters, parameters, and stages, and the complete build sequence. Debug logging requires additional
  275. resources and can slow down the build process, so it should only be enabled when further details are
  276. required to diagnose problems.</pd>
  277. </plentry>
  278. <plentry>
  279. <pt>
  280. <parmname>--output</parmname>=<varname>dir</varname></pt>
  281. <pt>
  282. <parmname>-o</parmname>
  283. <varname>dir</varname>
  284. </pt>
  285. <pd id="output.dir.desc">
  286. <p>Specifies the path of the output directory; the path can be absolute or relative to the current
  287. directory.</p>
  288. <p>This argument corresponds to the common parameter <parmname>output.dir</parmname>. By default, the output
  289. is written to the <filepath>out</filepath> subdirectory of the current directory.</p>
  290. </pd>
  291. </plentry>
  292. <plentry>
  293. <pt>
  294. <parmname>--filter</parmname>=<varname>files</varname>
  295. </pt>
  296. <pd>Specifies filter file(s) used to include, exclude, or flag content. </pd>
  297. <pd>
  298. <p>This argument corresponds to the common parameter <parmname>args.filter</parmname>. Relative paths are
  299. resolved against the current directory and internally converted to absolute paths.</p>
  300. <note>
  301. <p>To specify multiple filter files, use the system path separator character to delimit individual file
  302. paths (semicolon ‘<codeph>;</codeph>’ on Windows, and colon ‘<codeph>:</codeph>’ on macOS and Linux) and
  303. wrap the value in quotes:</p>
  304. <p><codeph>--filter="filter1.ditaval;filter2.ditaval;filter3.ditaval"</codeph></p>
  305. <p>DITAVAL files are evaluated in the order specified, so conditions specified in the first file take
  306. precedence over matching conditions specified in later files, just as conditions at the start of a
  307. DITAVAL document take precedence over matching conditions later in the same document.</p>
  308. </note>
  309. </pd>
  310. </plentry>
  311. <plentry>
  312. <pt>
  313. <parmname>--force</parmname>
  314. </pt>
  315. <pd>Force-install an existing plug-in.</pd>
  316. <pd>Passed as an additional option to the installation subcommand: <cmdname>dita
  317. install</cmdname> <varname>plug-in-zip</varname> <parmname>--force</parmname></pd>
  318. </plentry>
  319. <plentry>
  320. <pt>
  321. <parmname>--help</parmname></pt>
  322. <pt>
  323. <parmname>-h</parmname>
  324. </pt>
  325. <pd>Print a list of available arguments, options, and subcommands.</pd>
  326. </plentry>
  327. <plentry>
  328. <pt>
  329. <parmname>--logfile</parmname>=<varname>file</varname></pt>
  330. <pt>
  331. <parmname>-l</parmname>
  332. <varname>file</varname>
  333. </pt>
  334. <pd>Write logging messages to a file.</pd>
  335. </plentry>
  336. <plentry>
  337. <pt>
  338. <parmname>--parameter</parmname>=<varname>value</varname></pt>
  339. <pt>
  340. <parmname>-D</parmname><varname>parameter</varname>=<varname>value</varname>
  341. </pt>
  342. <pd>Specify a value for a DITA-OT or Ant build parameter.
  343. <p>The GNU-style <parmname>--parameter</parmname>=<varname>value</varname> form is only available for
  344. parameters that are configured in the plug-in configuration file; the Java-style <parmname>-D</parmname>
  345. form can also be used to specify additional non-configured parameters or set system properties.</p>
  346. <p>Parameters not implemented by the specified transformation type or referenced in a
  347. <filepath>.properties</filepath> file are ignored.</p>
  348. <note conkeyref="conref-task/pass-input-dir"/></pd>
  349. </plentry>
  350. <plentry>
  351. <pt>
  352. <parmname>--propertyfile</parmname>=<varname>file</varname>
  353. </pt>
  354. <pd>Use build parameters defined in the referenced <filepath>.properties</filepath> file.
  355. <p>Build parameters specified on the command line override those set in the <filepath>.properties</filepath>
  356. file.</p></pd>
  357. </plentry>
  358. <plentry>
  359. <pt>
  360. <parmname>--resource</parmname>=<varname>file</varname>
  361. </pt>
  362. <pt>
  363. <parmname>-r</parmname>
  364. <varname>file</varname>
  365. </pt>
  366. <pd>Process input with additional resources.
  367. <p>For example, to process a single topic file with a map that contains key definitions, use a command like
  368. this:
  369. <codeblock><cmdname>dita</cmdname> <parmname>--input</parmname>=<filepath>topic.dita</filepath> <parmname>--resource</parmname>=<filepath>keys.ditamap</filepath> <parmname>--format</parmname>=<option>html5</option></codeblock>
  370. </p></pd>
  371. </plentry>
  372. <plentry>
  373. <pt>
  374. <parmname>--temp</parmname>=<varname>dir</varname></pt>
  375. <pt>
  376. <parmname>-t</parmname>
  377. <varname>dir</varname>
  378. </pt>
  379. <pd conkeyref="parameters-base/dita.temp.dir.desc"/>
  380. <pd>This argument corresponds to the common parameter <parmname>dita.temp.dir</parmname>.</pd>
  381. </plentry>
  382. <plentry>
  383. <pt>
  384. <parmname>--verbose</parmname></pt>
  385. <pt>
  386. <parmname>-v</parmname>
  387. </pt>
  388. <pd>Verbose logging prints additional information to the console, including directory settings, effective
  389. values for Ant properties, input/output files, and informational messages to assist in troubleshooting.</pd>
  390. </plentry>
  391. </parml>
  392. </section>
  393. </refbody>
  394. </reference>