MCPcopy Create free account
hub / github.com/SpaceZephyr/myskill / main

Function main

pptx/scripts/replace.py:356–381  ·  view source on GitHub ↗

Main entry point for command-line usage.

()

Source from the content-addressed store, hash-verified

354
355
356def main():
357 """Main entry point for command-line usage."""
358 if len(sys.argv) != 4:
359 print(__doc__)
360 sys.exit(1)
361
362 input_pptx = Path(sys.argv[1])
363 replacements_json = Path(sys.argv[2])
364 output_pptx = Path(sys.argv[3])
365
366 if not input_pptx.exists():
367 print(f"Error: Input file '{input_pptx}' not found")
368 sys.exit(1)
369
370 if not replacements_json.exists():
371 print(f"Error: Replacements JSON file '{replacements_json}' not found")
372 sys.exit(1)
373
374 try:
375 apply_replacements(str(input_pptx), str(replacements_json), str(output_pptx))
376 except Exception as e:
377 print(f"Error applying replacements: {e}")
378 import traceback
379
380 traceback.print_exc()
381 sys.exit(1)
382
383
384if __name__ == "__main__":

Callers 1

replace.pyFile · 0.70

Calls 1

apply_replacementsFunction · 0.85

Tested by

no test coverage detected