The cleanmymac.target Module¶
-
class
cleanmymac.target.DirTarget(config, update=False, verbose=False)[source]¶ Bases:
cleanmymac.target.TargetClass encapsulating the logic to execute directory based cleanup operations. The main operation consists of identifying and removing all matching directories in a given path with the exception of the most recent version. This is an abstract class.
Warning
if pattern is not specified: all files and folders in dir will be removed
Parameters: -
config¶
-
-
class
cleanmymac.target.ShellCommandTarget(config, update=False, verbose=False)[source]¶ Bases:
cleanmymac.target.TargetClass encapsulating general logic to execute cleanup operations based on predefined shell commands. This is an abstract class.
Parameters: -
clean_commands¶ the shell commands executed on clean. Each command is a string as expected by
sarge.run()Returns: a list of shell commands Return type: list
-
config¶
-
-
class
cleanmymac.target.Target(config, update=False, verbose=False)[source]¶ Bases:
objectthe main cleanup Target. This is an abstract class.
Parameters: -
config¶
-
-
class
cleanmymac.target.YamlDirTarget(config, update=False, verbose=False)[source]¶ Bases:
cleanmymac.target.DirTargetClass encapsulating the logic to execute directory based cleanup operations. The main operation consists of identifying and removing all matching directories in a given path with the exception of the most recent version. This concrete implementation allows for the specification of entries in a YAML configuration file. See predefined builtins in
cleanmymac.builtins.Parameters: -
clean(**kwargs)¶
-
config¶
-
describe()¶
-
entries¶
-
update(**kwargs)¶
-
update_message¶
-
-
class
cleanmymac.target.YamlShellCommandTarget(config, update=False, verbose=False)[source]¶ Bases:
cleanmymac.target.ShellCommandTargetClass encapsulating logic to initialize and execute cleanup targets defined in YAML files. See predefined builtins in
cleanmymac.builtins.Parameters: -
clean(**kwargs)¶
-
clean_commands¶
-
config¶
-
describe()¶
-
update(**kwargs)¶
-
update_commands¶
-