A Python utility that inverts colors in PowerPoint presentations. This tool can process individual PPTX files or entire directories, inverting all colors including slide backgrounds, text, and images.
- Invert colors in single PPTX files or entire directories
- Recursive directory processing
- Parallel processing for improved performance
- Progress bar with estimated time remaining
- Graceful interrupt handling
- Skip already processed files
- Maintains original directory structure
- Timeout protection for large files
- Python 3.7+
- uv (for dependency management)
- Install uv using the following command:
curl -LsSf https://astral.sh/uv/install.sh | sh
- Create a new virtual environment and install dependencies:
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv sync
Process a single file:
uv run cli.py presentation.pptx
Process a directory:
uv run cli.py path/to/presentations/
uv run cli.py [-h] [-o OUTPUT] [-w WORKERS] [-r] [-t TIMEOUT] [-f] input
Arguments:
input
: Input file or directory path-o, --output
: Output file or directory path (optional)-w, --workers
: Number of worker threads (default: CPU count * 4)-r, --recursive
: Process subdirectories recursively-t, --timeout
: Timeout in seconds for processing each file (default: 300)-f, --force
: Force processing of all files, even if they exist in output
Process a single file with custom output path:
uv run cli.py presentation.pptx -o inverted.pptx
Process a directory recursively:
uv run cli.py presentations/ -r -o output/
Process with custom worker count and timeout:
uv run cli.py presentations/ -w 8 -t 600
- When processing a single file without specifying an output path, the inverted file will be saved with " (inverted)" appended to the filename
- When processing a directory without specifying an output path, a new directory will be created with " (inverted)" appended to the original directory name
- The tool maintains the original directory structure when processing recursively