Class StencilArgsParser
java.lang.Object
io.github.erdos.stencil.standalone.StencilArgsParser
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ArgsParser.ParamMarker<File>
A file that contains job data.static final ArgsParser.ParamMarker<Boolean>
static final ArgsParser.ParamMarker<Boolean>
Only evaluate fragment include directives.static final ArgsParser.ParamMarker<File>
Result files are placed in this directory.static final ArgsParser.ParamMarker<Boolean>
Result files will be overwritten when already exist in target directory.static final ArgsParser
static final ArgsParser.ParamMarker<Boolean>
Should display help message.static final ArgsParser.ParamMarker<Boolean>
Should display version info. -
Method Summary
Modifier and TypeMethodDescriptionstatic Boolean
If specified, only inlclude directives will be evaluated in template.static File
Finds output directory in parsed parameters or returns current working directory.static Boolean
Finds output directory in parsed parameters or returns current working directory.static ArgsParser.ParseResult
-
Field Details
-
PARSER
-
OUTPUT_DIR
Result files are placed in this directory. -
OVERWRITE
Result files will be overwritten when already exist in target directory. -
SHOW_HELP
Should display help message. -
SHOW_VERSION
Should display version info. -
ONLY_INLCUDES
Only evaluate fragment include directives. -
JOBS_FILE
A file that contains job data. -
JOBS_FROM_STDIN
-
-
Method Details
-
parse
-
getOutputDirectory
Finds output directory in parsed parameters or returns current working directory.- Returns:
- output directory where rendered files will be put
- Throws:
NullPointerException
- if param is nullIllegalArgumentException
- if output file path does not exist or is not a directory
-
getOutputOverwritten
Finds output directory in parsed parameters or returns current working directory.- Returns:
- should resulting files override existing files?
- Throws:
NullPointerException
- if param is null
-
getOnlyIncludes
If specified, only inlclude directives will be evaluated in template.- Returns:
- default false
- Throws:
NullPointerException
- if param is null
-