Validate input file exists and has correct extension
(file_path: str)
| 131 | |
| 132 | |
| 133 | def validate_input_file(file_path: str) -> Path: |
| 134 | """Validate input file exists and has correct extension""" |
| 135 | path = Path(file_path) |
| 136 | |
| 137 | if not path.exists(): |
| 138 | raise FileNotFoundError(f"Input file not found: {file_path}") |
| 139 | |
| 140 | if path.suffix.lower() not in [".pptx", ".ppt"]: |
| 141 | raise ValueError(f"Invalid file type. Expected .pptx or .ppt, got {path.suffix}") |
| 142 | |
| 143 | return path.resolve() |
| 144 | |
| 145 | |
| 146 | def create_output_dir(args) -> Path: |