Skip to content

Latest commit

 

History

History
181 lines (97 loc) · 2.87 KB

File metadata and controls

181 lines (97 loc) · 2.87 KB

Cli Parser

CLI Parser.

Handsdown API Index / Handsdown / Cli Parser

Auto-generated documentation for handsdown.cli_parser module.

CLINamespace

Show source in cli_parser.py:16

Main CLI Namespace.

Signature

class CLINamespace: ...

CLINamespace().get_source_code_url

Show source in cli_parser.py:36

Get URL to source code.

Returns

URL as a string.

Signature

def get_source_code_url(self) -> str: ...

abs_path

Show source in cli_parser.py:88

Validate path_str and make it absolute.

Arguments

  • path_str - A path to check.

Returns

An absolute path.

Signature

def abs_path(path_str: str) -> Path: ...

dir_abs_path

Show source in cli_parser.py:102

Validate directory path_str and make it absolute.

Arguments

  • path_str - A path to check.

Returns

An absolute path.

Raises

  • argparse.ArgumentTypeError - If path is not a directory.

Signature

def dir_abs_path(path_str: str) -> Path: ...

existing_dir_abs_path

Show source in cli_parser.py:123

Validate existing directory path_str and make it absolute.

Arguments

  • path_str - A path to check.

Returns

An absolute path.

Raises

  • argparse.ArgumentTypeError - If path does not exist or is not a directory.

Signature

def existing_dir_abs_path(path_str: str) -> Path: ...

git_repo

Show source in cli_parser.py:58

Validate git_repo_url to be a GitHub repo and converts SSH urls to HTTPS.

Arguments

  • git_repo_url - GitHub URL or remote.origin.url

Returns

A GitHub URL.

Signature

def git_repo(git_repo_url: str) -> str: ...

parse_args

Show source in cli_parser.py:164

Get CLI arguments parser.

Returns

An argparse.ArgumentParser instance.

Signature

def parse_args(args: Iterable[str]) -> CLINamespace: ...

See also

parse_theme

Show source in cli_parser.py:147

Cast theme name to Theme.

Signature

def parse_theme(name: str) -> Theme: ...

See also