A great example is the config.json.
[!WARN] All path matching now uses glob pattern matching (see Python fnmatch/glob syntax).
A Config File and hold multiple nested Config Root Tree.
Array: [Config Root]
Object: {
name: String that is name displayed in log, or"<unknown>"only_in_release: if true, only build with command arg--release.src_dir: path of source directory (default issrc/).out_dir: path of output directory (default isout/).log_level- String: log level in "DEBUG", "INFO" (default), "WARN", "ERROR", "CRITICAL"
- Integer: log level in 10, 20, 30, 40, 50
extra_out_dirs: List of string paths that copy the output zip to.excludes: Path Tree that default excludes with glob.merge: Path Tree that default merging.tree: Config Tree if not present, config will not load, useful forchildren.children: Config Root Tree.
}
Config Tree controls I/O and can hold multiple nested Config Tree:
Array: [Config Tree]
Object: {
removes: Path Tree that remove stored data in copied storage start withremoves.inputs*: Input Tree that put files into storage.output: String that output stored data to a zip file at{out_dir}/{output}.zipchildren: Config Tree that copy current stored data and entering.
}
Path Tree will transmute structure into a set of glob patterns (strings). The result could be a directory or file:
Array: [Path Tree]
String: a path relates to latest path.
Object: {
type: ifload_json, set directory to the dirname ofpath, and readpathfile as Path Tree.path: a path relates to latest path, supports glob patterns. If noextras, add this path into result. If hasextras, this path will be used as a new relative path.extras: a Path Tree.
}
Path Tree with Output will transmute structure into tuples of (string, string). The result could be (directory, new directory or none) or (file, new file or none):
Array: [Path Tree with Output]
String: a path relates to latest path.
Object: {
type: ifload_json, set directory to the dirname ofpath, and readpathfile as Path Tree with Output.path: a path relates to latest path. If noextras, add this path into result. If hasextras, this path will used as a new relative path.out_path: a output path relates to latest out path. If noextras, add this out path into result. If hasextras, this path will used as new relative out path.extras: a Path Tree with Output.
}
Path Tree will transmute structure into set of strings. The result could be directory or file:
Array: [Input Tree]
String: a path relates to latest path.
Object: {
type: ifload_json, set directory to the dirname ofpath, and readpathfile as Input Tree.path: a path relates to latest path. If noextras, add this path into result. If hasextras, this path will used as a new relative path.blocking_mode:- False (default): if file does match
includespath, load it. - True: if file does not match
includespath, block it.
- False (default): if file does match
includes: Path Tree with Output to include.excludes: Path Tree to exclude.extras: a Input Tree
}