swh.model.cli module

class swh.model.cli.SWHIDParamType[source]

Bases: click.types.ParamType

Click argument that accepts SWHID and return them as swh.model.identifiers.SWHID instances

name = 'SWHID'
convert(value, param, ctx)swh.model.identifiers.SWHID[source]

Converts the value. This is not invoked for values that are None (the missing value).

swh.model.cli.swhid_of_file(path)[source]
swh.model.cli.swhid_of_file_content(data)[source]
swh.model.cli.swhid_of_dir(path: bytes, exclude_patterns: List[bytes] = None) → str[source]
swh.model.cli.swhid_of_origin(url)[source]
swh.model.cli.swhid_of_git_repo(path)[source]
swh.model.cli.identify_object(obj_type, follow_symlinks, exclude_patterns, obj)[source]