Complete novice question

I have zero experience with Applescripts. Someone posted a command-line routine that extracts notes from a Keynote presentation and prints them along with the slide title. He said that it should be “relatively easy” to make an Applescript out of the routine, but I do not even know where to begin.

Can someone here help?

Here’s the link to the page where he describes it, and the commands:


This should work. The only thing you need to do is set the path to where the xlst file is located at. In my version here the file is on my desktop. When you run you are prompted to choose the keynote file and the output file’s name and location.

-- Path declarations
set xsltPath to quoted form of POSIX path of (((path to desktop) as Unicode text) & "keynote-speakers-notes-xhtml.xslt")
set theKeynote to quoted form of (POSIX path of (((choose file with prompt "Please choose the keynote file.") as Unicode text) & "index.apxl.gz"))
set outputName to quoted form of (POSIX path of (((choose file name with prompt "Specify output file name and location.") as Unicode text) & ".xhtml"))

do shell script "gzcat " & theKeynote & " | xsltproc " & xsltPath & "  - > " & outputName

Thank you SO much for your help! This is exactly what I need, and it works very well except for one thing. For whatever reason, only the last line in the “notes” field on each slide is transfered to the XHTML document. Any idea why that would be?

Honestly no idea, when you do it via the command line as shown in the link does it work and do all the slides?

I don’t know how to use the command line to do it (the main reason I asked for help with a script :))

I’ll email the author of the XSLT document to see if he knows.

Thanks again.