zooc.config.config
Post-install and uninstall script for ZOOC.
Run this script after the ZOOC package is installed:
~/klippy-env/bin/zooc-setup
Script copies the necessary configuration files and modifies the printer configuration to include ZOOC:
~/klipper/klippy/extras/zooc.py for klipper to load ZOOC module.
~/klipper_config/zooc.cfg for the default ZOOC configuration, if it does not exist yet.
Modify ~/printer.cfg to include the above ZOOC configuration.
To uninstall ZOOC, run the teardown script first to undo the zooc-setup changes:
~/klippy-env/bin/zooc-teardown
- zooc.config.config.copy_resource_file(input_pkg, input_file, output_path, mkdir=True, overwrite=True)
Copy a file from a package to a destination path.
- Parameters:
input_pkg (str) – Package name where the file is located.
input_file (str) – File name to copy.
output_path (str) – Destination path where the file should be copied.
mkdir (bool) – If True, create the directory if it does not exist.
overwrite (bool) – If True, overwrite the file if it already exists.
- Returns:
True if the file was copied, False if it already exists and overwrite is False.
- Raises:
FileNotFoundError – If the output path does not exist and mkdir is False
- Return type:
- zooc.config.config.setup()
Post-install script for ZOOC.
- Returns:
0 on success, 1 on failure.
- Return type:
- zooc.config.config.teardown()
Uninstalls ZOOC post-install files.
- Returns:
0 on success, 1 on failure.
- Return type: