Package org.asciidoctor
Class Options
java.lang.Object
org.asciidoctor.Options
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OptionsBuilder
builder()
map()
Deprecated.For internal use only.void
setAttributes
(Map<String, Object> attributes) void
setAttributes
(Attributes attributes) void
setBackend
(String backend) void
setBaseDir
(String baseDir) void
setCatalogAssets
(boolean catalogAssets) If true, tells the parser to capture images and links in the reference table.void
setCompact
(boolean compact) void
setDestinationDir
(String destinationDir) void
setDocType
(String docType) void
void
setHeaderFooter
(boolean headerFooter) Toggle including header and footer into the output.void
setInPlace
(boolean inPlace) void
setMkDirs
(boolean mkDirs) void
void
setParse
(boolean parse) If true, the source is parsed eagerly (i.e., as soon as the source is passed to the load or load_file API).void
setParseHeaderOnly
(boolean parseHeaderOnly) void
Safe method calls safeMode.getLevel() to put the required level.void
setSourceDir
(String srcDir) void
setSourcemap
(boolean sourcemap) Keeps track of the file and line number for each parsed block.void
setTemplateCache
(boolean templateCache) void
setTemplateDirs
(String... templateDirs) void
setTemplateEngine
(String templateEngine) void
void
setToFile
(boolean toFile) Toogle writing output to a file.void
Enable writing output to a file.void
setToStream
(OutputStream toStream)
-
Field Details
-
IN_PLACE
- See Also:
-
ATTRIBUTES
- See Also:
-
HEADER_FOOTER
- See Also:
-
TEMPLATE_DIRS
- See Also:
-
TEMPLATE_ENGINE
- See Also:
-
TO_FILE
- See Also:
-
TO_DIR
- See Also:
-
MKDIRS
- See Also:
-
SAFE
- See Also:
-
SOURCEMAP
- See Also:
-
STANDALONE
- See Also:
-
ERUBY
- See Also:
-
CATALOG_ASSETS
- See Also:
-
COMPACT
- See Also:
-
DESTINATION_DIR
- See Also:
-
SOURCE_DIR
- See Also:
-
BACKEND
- See Also:
-
DOCTYPE
- See Also:
-
BASEDIR
- See Also:
-
TEMPLATE_CACHE
- See Also:
-
SOURCE
- See Also:
-
PARSE
- See Also:
-
PARSE_HEADER_ONLY
- See Also:
-
-
Constructor Details
-
Method Details
-
builder
- Returns:
- Empty OptionsBuilder instance.
-
setInPlace
public void setInPlace(boolean inPlace) -
setAttributes
-
setAttributes
-
setTemplateDirs
-
setTemplateEngine
-
setToFile
Enable writing output to a file. The file includes header and footer by default.- Parameters:
toFile
- The path to the output file. If the path is not absolute, it is interpreted relative to what was set viasetToDir(String)
} orsetBaseDir(String)
}, in that order.
-
setToStream
-
setToFile
public void setToFile(boolean toFile) Toogle writing output to a file.- Parameters:
toFile
- Iftrue, write output to a file in the same directory as the input file, including header and footer into the output. If
false
, return output as a string without any header or footer. The default header and footer visibility can be overridden usingsetHeaderFooter(boolean)
.
-
setToDir
-
setMkDirs
public void setMkDirs(boolean mkDirs) -
setSafe
Safe method calls safeMode.getLevel() to put the required level.- Parameters:
safeMode
- enum.
-
setSourcemap
public void setSourcemap(boolean sourcemap) Keeps track of the file and line number for each parsed block. (Useful for tooling applications where the association between the converted output and the source file is important).- Parameters:
sourcemap
- value.
-
setEruby
-
setCatalogAssets
public void setCatalogAssets(boolean catalogAssets) If true, tells the parser to capture images and links in the reference table. (Normally only IDs, footnotes and indexterms are included). The reference table is available via the references property on the document AST object. (Experimental).- Parameters:
catalogAssets
- value.
-
setCompact
public void setCompact(boolean compact) -
setDestinationDir
-
setSourceDir
-
setBackend
-
setDocType
-
setBaseDir
-
setTemplateCache
public void setTemplateCache(boolean templateCache) -
setParse
public void setParse(boolean parse) If true, the source is parsed eagerly (i.e., as soon as the source is passed to the load or load_file API). If false, parsing is deferred until the parse method is explicitly invoked.- Parameters:
parse
- value.
-
setParseHeaderOnly
public void setParseHeaderOnly(boolean parseHeaderOnly) -
setOption
-
map
Deprecated.For internal use only.
-
builder()
instead.