Fail gracefully on machines without osascript support
This commit is contained in:
@@ -950,6 +950,14 @@ def _import_presenter_notes(
|
|||||||
Also exports slides as PNG images to media/slides/{project_name}/.
|
Also exports slides as PNG images to media/slides/{project_name}/.
|
||||||
Backs up existing manuscript.txt before overwriting.
|
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}...")
|
print(f" Extracting presenter notes from {keynote_file.name}...")
|
||||||
|
|
||||||
# Find the JXA script (in the same directory as this module)
|
# Find the JXA script (in the same directory as this module)
|
||||||
|
|||||||
Reference in New Issue
Block a user