Package org.asciidoctor
Class Options
java.lang.Object
org.asciidoctor.Options
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OptionsBuilderbuilder()map()Deprecated.For internal use only.voidsetAttributes(Map<String, Object> attributes) voidsetAttributes(Attributes attributes) voidsetBackend(String backend) voidsetBaseDir(String baseDir) voidsetCatalogAssets(boolean catalogAssets) If true, tells the parser to capture images and links in the reference table.voidsetCompact(boolean compact) voidsetDestinationDir(String destinationDir) voidsetDocType(String docType) voidvoidsetHeaderFooter(boolean headerFooter) Toggle including header and footer into the output.voidsetInPlace(boolean inPlace) voidsetMkDirs(boolean mkDirs) voidvoidsetParse(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).voidsetParseHeaderOnly(boolean parseHeaderOnly) voidSafe method calls safeMode.getLevel() to put the required level.voidsetSourceDir(String srcDir) voidsetSourcemap(boolean sourcemap) Keeps track of the file and line number for each parsed block.voidsetTemplateCache(boolean templateCache) voidsetTemplateDirs(String... templateDirs) voidsetTemplateEngine(String templateEngine) voidvoidsetToFile(boolean toFile) Toogle writing output to a file.voidEnable writing output to a file.voidsetToStream(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. Iffalse, 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.