The cleanmymac.cli Module

cleanmymac.cli.get_options(path=None)[source]

Return the global configuration options. This method also expands the user home folder specified by ‘~’. In addition, the yaml config file is validated after parse. If the path is not specified, the ~/.cleanmymac.yaml configuration file is looked up, if not found, the global configuration is set to an empty dict.

Parameters:path (str) – optional path to a yaml configuration file
Returns:a python object containing the actual configuration
Return type:dict

Commandline Interface

Usage: cleanmymac [OPTIONS] TARGETS

  the main **run** method, responsible for creating the parser and executing
  the main logic in **cleanmymac**

  :param bool update: perform update of targets (if applicable) :param bool
  dry_run: do not execute the actions, but log the result :param bool quiet:
  quiet mode (no output), show a progressbar instead :param bool
  pretty_print: enable pretty printing with colors :param bool strict: if
  set enforce strict(er) rules when validating targets :param bool
  list_targets: list the installed targets :param bool stop_on_error: abort
  the execution on first error :param str config: the configuration path
  :param str targets_path: extra targets paths :param list targets: the
  targets

Options:
  -L, --log-level LVL      Either CRITICAL, ERROR, WARNING, INFO or DEBUG
  -u, --update             update the target if applicable
  -d, --dry_run            describe the actions to be performed, do not
                           execute them
  -q, --quiet              run in quiet mode
  -p, --pretty-print       enable pretty printing with colors
  --strict / --no-strict   strict mode: enforce strict(er) rules when
                           validating targets
  -l, --list               list registered cleanup targets
  -s, --stop_on_error      stop execution when first error is detected
  -c, --config TEXT        specify the configuration path
  -t, --targets_path PATH  specify extra yaml defined targets path
  -v, --version            Show the version and exit.
  -?, -h, --help           Show this message and exit.