Fail gracefully on machines without osascript support

This commit is contained in:
2026-05-09 12:11:36 +02:00
parent 831c0c4e60
commit 12bf494f2d
+8
View File
@@ -950,6 +950,14 @@ def _import_presenter_notes(
Also exports slides as PNG images to media/slides/{project_name}/.
Backs up existing manuscript.txt before overwriting.
"""
# osascript is macOS-only; skip gracefully on WSL/Linux/Windows
if shutil.which("osascript") is None:
print(
f" Warning: osascript not available (not macOS) — skipping Keynote import for {keynote_file.name}.",
file=sys.stderr,
)
return
print(f" Extracting presenter notes from {keynote_file.name}...")
# Find the JXA script (in the same directory as this module)