Skip to content

Instantly share code, notes, and snippets.

@kyontan
Forked from lambdamusic/keynote.scpt
Last active November 20, 2019 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyontan/cd0e08274c79b5b3cc65b80dacd8973d to your computer and use it in GitHub Desktop.
Save kyontan/cd0e08274c79b5b3cc65b80dacd8973d to your computer and use it in GitHub Desktop.
Apple Keynote: export presenter notes
-- HOWTO:
-- after saving it, open with Script Editor (default) and run it
-- PREREQUISITES:
-- make sure your Keynote presentation is open in the background
set presenterNotes to ""
set slideNumber to 1
tell application "Keynote"
activate
tell front document
set thePresentationName to name
repeat with sc from 1 to the count of slides
tell slide sc
if not (the presenter notes) = "" and not (skipped) then
set presenterNotes to presenterNotes & "# P" & slideNumber & return
set presenterNotes to presenterNotes & the presenter notes & return & return
set slideNumber to slideNumber + 1
end if
end tell
end repeat
end tell
end tell
set userName to system attribute "USER"
set filePath to "/Users/" & userName & "/Desktop/notes-" & thePresentationName & ".md"
do shell script "echo " & quoted form of presenterNotes & " > " & quoted form of filePath
-- based on http://apple.stackexchange.com/questions/136118/how-to-print-full-presenter-notes-without-slides-in-keynote
@SteveHewson
Copy link

This is awesome!
Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment