()
| 227 | |
| 228 | |
| 229 | def main(): |
| 230 | parser = ArgumentParser() |
| 231 | parser.add_argument('-i', '--input', type=str, required=True, |
| 232 | help='Path to the MVS interface archive file') |
| 233 | parser.add_argument('-p', '--images-path', type=str, required=True, |
| 234 | help='Path to the directory containing image files') |
| 235 | parser.add_argument('--dry-run', action='store_true', |
| 236 | help='Print what would be done without actually modifying files') |
| 237 | args = parser.parse_args() |
| 238 | |
| 239 | # Check dependencies first |
| 240 | if not DEPENDENCIES_AVAILABLE and not args.dry_run: |
| 241 | print("Error: Missing required dependencies for EXIF modification.") |
| 242 | print("Install with: pip install pillow piexif") |
| 243 | print("Or use --dry-run to see what would be done.") |
| 244 | return 1 |
| 245 | |
| 246 | # Validate input files |
| 247 | if not os.path.exists(args.input): |
| 248 | print(f"Error: MVS file not found: {args.input}") |
| 249 | return 1 |
| 250 | |
| 251 | if not os.path.isdir(args.images_path): |
| 252 | print(f"Error: Images directory not found: {args.images_path}") |
| 253 | return 1 |
| 254 | |
| 255 | # Process the MVS scene |
| 256 | success = process_mvs_scene(args.input, args.images_path, args.dry_run) |
| 257 | |
| 258 | return 0 if success else 1 |
| 259 | |
| 260 | |
| 261 | if __name__ == '__main__': |
no test coverage detected