verbose=CommandLine.EntryPoint.Parameter(
        "Generate verbose output during generation"),
)
@CommandLine.Constraints(
    plugin=_PluginTypeInfo,
    output_name=CommandLine.StringTypeInfo(),
    output_dir=CommandLine.DirectoryTypeInfo(ensure_exists=False, ),
    input=CommandLine.FilenameTypeInfo(
        match_any=True,
        arity="+",
    ),
    include=CommandLine.StringTypeInfo(arity="*", ),
    exclude=CommandLine.StringTypeInfo(arity="*", ),
    output_data_filename_prefix=CommandLine.StringTypeInfo(arity="?", ),
    plugin_arg=CommandLine.DictTypeInfo(
        require_exact_match=False,
        arity="*",
    ),
    output_stream=None,
)
def Generate(
    plugin,
    output_name,
    output_dir,
    input,
    include=None,
    exclude=None,
    output_data_filename_prefix=None,
    filter_unsupported_extensions=False,
    filter_unsupported_attributes=False,
    plugin_arg=None,
    force=False,
コード例 #2
0
    preserve_dir_structure=CommandLine.EntryPoint.Parameter(
        "Preserve the input's directory structure when generating output."),
    ignore_errors=CommandLine.EntryPoint.Parameter(
        "Populate context values not specified with an empty string rather than generating errors."
    ),
    debug=CommandLine.EntryPoint.Parameter(
        "Display context rather than generating output."),
)
@CommandLine.Constraints(
    output_dir=CommandLine.DirectoryTypeInfo(ensure_exists=False, ),
    input=CommandLine.FilenameTypeInfo(
        match_any=True,
        arity="+",
    ),
    context=CommandLine.DictTypeInfo(
        require_exact_match=False,
        arity="*",
    ),
    context_code=CommandLine.StringTypeInfo(
        validation_expression="^.+:.+$",
        arity="*",
    ),
    output_stream=None,
)
def Generate(
    output_dir,
    input,
    context=None,
    context_code=None,
    preserve_dir_structure=False,
    ignore_errors=False,
    debug=False,