Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]

A Appendix

A.1 Command Line Options and Configuration Settings for AsciiDoc

DAPS supports the following AsciiDoc-specific command line options. These are global options and need to be specified before the subcommand. Additional configuration settings can be made in the DAPS configuration files (for example in a DC file).

Table A.1: Command Line Options/Configuration Settings for AsciiDoc
CLI OptionConfig SettingExplanation

--adocattr

ADOC_ATTRIBUTES

Define or delete AsciiDoc document attributes. To overwrite an attribute already defined in the AsciiDoc document, use NAME=VALUE, or just NAME for attributes without a value. To delete a value set in the document use NAME!. To set a value that is not already set in the document, use NAME=VALUE@. Refer to the AsciiDoc documentation for more information.

Examples:

daps -d DC-adoc --adocattr "author=John Doe" \

--adocattr "revision=beta1"

You may specify this option multiple times to set more than one attribute.

You may also specify these attributes in the Doc Config file (DC-file) using the following syntax. This way the attributes will always be applied whenever you call DAPS with a DC-file. This can be handy when creating different versions of a document from a single source by using attributes and AsciiDoc’s if-statements to decide whether to display parts of the document or not (see Awesome Asciidoctor: Using Conditional Directives (https://blog.mrhaki.com/2014/08/awesome-asciidoc-using-conditional.html) for more information). You can create a DC-file containing different attribute settings for each document version.

ADOC_ATTRIBUTES="--attribute author=myself"

ADOC_ATTRIBUTES+="--attribute "revision=beta1"

Note that when using the config file option, you always have to prefix the KEY=VALUE pair with --attribute. To specify more than one value, use the += notation for subsequent values as shown above.

Displaying Attributes in the Resulting Document:

All AsciiDoc attributes passed to DAPS on the command line or via the DC-file can be displayed in the document by using the contents of the variable daps-adoc-attributes, for example:

ifeval::[ "{daps-adoc-attributes}" != "" ]

This document was build using the following AsciiDoc attributes:

[source, subs="attributes"]

----

{daps-adoc-attributes}

----

endif::[]

--adocimgdir

ADOC_IMG_DIR

Specify a directory for the images used in the AsciiDoc sources. Must contain all images, subdirectories are ignored. Examples:

daps -d DC-adoc --adocimgdir "adoc/images" ADOC_IMG_DIR="adoc/images"

 

ADOC_BACKEND

Specify whether to use asciidoc or asciidoctor. Specifying this parameter is usually not necessary, because DAPS will automatically check which program is installed. If both are installed, asciidoctor will be preferred. Only required if the back-end binary is not in your path or if you prefer asciidoc over asciidoctor. Examples:

ADOC_BACKEND="/home/doc/asciidoctor/asciidoctor" ADOC_BACKEND="/usr/bin/asciidoc"

 

ADOC_POST

If set to "yes", the XML produced from the AsciiDoc sources will be processed again before DAPS generates output. This can be used to change or clean up the XML. The stylesheet to be used can be specified via ADOC_POST_STYLE. By default this is set to "no". Example:

ADOC_POST="yes"

 

ADOC_POST_STYLE

Stylesheet to post-process the XML produced from the AsciiDoc sources. Requires ADOC_POST to be set to "yes" (will be ignored otherwise). By default it is set to a stylesheet shipped with DAPS that does some cleaning up.

 

ADOC_SET

If set to "yes" a multipart book in AsciiDoc will be converted to a set in DocBook. Each part of the original sources will becaome a book in DocBook. Require the AsciiDoc sources to only contain parts (one for what is to become a book) and no extra contant. By default this is set to "no". Example:

ADOC_SET="yes"

 

ADOC_TYPE

Same option as you would set by --doctype with asciidoc or asciidoctor. Valid values are "article", "book", and "manpage". Do not use "inline" as it will not work with DAPS. Setting "manpage" requires manpage-specific content (refer to the AsciiDoc documentation). Otherwise processing the source will fail. This setting will override the :doctype: definition in the AsciiDoc source document.

The following subcommands support AsciiDoc-specific commands:

list-srcfiles

This subcommand lists all files that are used to build the document, including images and the DC file. It supports several options for filtering the output. To restrict the results to only AsciiDoc files, use the option --adoconly. To exclude AsciiDoc files from the results, use the option --noadoc. Examples:

tux > daps -d DC-adoc_test list-srcfiles
/home/doc/documents/DC-adoc_test
/home/doc/documents/adoc/appendix.adoc
/home/doc/documents/adoc/book.adoc
/home/doc/documents/adoc/part_block.adoc
/home/doc/documents/adoc/part_inlines.adoc
/home/doc/documents/images/src/dia/dia_example.dia
/home/doc/documents/images/src/jpg/jpg_example.jpg
/home/doc/documents/images/src/png/png_example.png
/home/doc/documents/images/src/png/png_example2.png
/home/doc/documents/images/src/svg/svg_example.svg

tux > daps -d DC-adoc_test list-srcfiles --adoconly
/home/doc/documents/adoc/appendix.adoc
/home/doc/documents/adoc/book.adoc
/home/doc/documents/adoc/part_block.adoc
/home/doc/documents/adoc/part_inlines.adoc

tux > daps -d DC-adoc_test list-srcfiles
/home/doc/documents/DC-adoc_test
/home/doc/documents/images/src/dia/dia_example.dia
/home/doc/documents/images/src/jpg/jpg_example.jpg
/home/doc/documents/images/src/png/png_example.png
/home/doc/documents/images/src/png/png_example2.png
/home/doc/documents/images/src/svg/svg_example.svg
Print this page