structured keynote reading: walk kn.documentarchive -> show -> slide tree -> per-slide archives and pull out titles, body text, and notes. type and field numbers are sourced from the keynote-parser python project and verified against real documents.
Example: cmd: -r:off
import src/iwork/keynote import iwork let doc = openDocument("deck.key") for slide in doc.slides: echo slide.index, ": ", slide.title for line in slide.body: echo " ", line
Types
Slide = object index*: int ## 1-based position in the deck title*: string ## title placeholder text, "" if none body*: seq[string] ## every other text box on the slide presenterNotes*: string ## note text, "" if none isSkipped*: bool ## true when the slide is skipped in the show
- one presented slide (masters are not slides) Source Edit
Procs
proc keynoteSlides(idx: ObjectIndex): seq[Slide] {. ...raises: [IworkFormatError, KeyError, Exception], tags: [RootEffect], forbids: [].}
- walks the show's slide tree into slide objects, in deck order Source Edit