swh.model.cli module

class swh.model.cli.CoreSWHIDParamType[source]

Bases: click.types.ParamType

Click argument that accepts a core SWHID and returns them as swh.model.identifiers.CoreSWHID instances

name = 'SWHID'

the descriptive name of this type

convert(value, param, ctx)swh.model.identifiers.CoreSWHID[source]

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

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