Skip to content

cli

Command line setup.

add(
    no_input: bool,
    checkout: str,
    directory: str,
    overwrite_if_exists: bool,
    skip_if_file_exists: bool,
    default_config: bool,
    destination: Path,
    accept_hooks: str,
    path_or_url: str,
    context_params: Optional[
        MutableMapping[str, Any]
    ] = None,
) -> None

Add the template or configuration PATH_OR_URL to an existing project.

cli() -> None

Render templates using composition.

create(
    no_input: bool,
    checkout: str,
    directory: str,
    overwrite_if_exists: bool,
    skip_if_file_exists: bool,
    default_config: bool,
    destination: Path,
    accept_hooks: str,
    path_or_url: str,
    context_params: Optional[
        MutableMapping[str, Any]
    ] = None,
) -> None

Create a project from the template or configuration PATH_OR_URL in using optional [CONTEXT_PARAMS].

link(
    no_input: bool,
    checkout: str,
    directory: str,
    overwrite_if_exists: bool,
    skip_if_file_exists: bool,
    default_config: bool,
    destination: Optional[Path],
    path_or_url: str,
    context_params: Optional[
        MutableMapping[str, Any]
    ] = None,
) -> None

Link an existing git repo to the template or composition PATH_OR_URL using optional [CONTEXT_PARAMS].

update(
    no_input: bool,
    destination: Path,
    context_params: Optional[OrderedDict] = None,
) -> None

Update the project to the latest version of each template.

validate_context_params(
    ctx: Any, param: Any, value: list
) -> Optional[OrderedDict]

Validate context parameters.

Convert a tuple to a dict

e.g.: ('program_name=foobar', 'startsecs=66') -> {'program_name': 'foobar', 'startsecs': '66'}

Parameters:

ctx

Click context (unused)

TYPE: Any

param

Click parameter (unused)

TYPE: Any

value

Click parameter value

TYPE: list

Returns:

Optional[OrderedDict]

An ordered dict of the parameter values or None if no parameters.

Raises:

BadParameter

If the parameters are not key=value.