Skip to content

JavaScript API interface for Keynote (Mac slideshow app)

License

Notifications You must be signed in to change notification settings

macintoshhelper/keynote-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

keynote-js

Node.js JavaScript API interface for Keynote (Apple iWork slideshow app).

Getting Started

Installing:

npm i keynote-js

Create file script.js:

const { document } = require('keynote-js');

const main = async () => {
  const doc = new Document({ name: 'Test 123', theme: 'Test Theme' });

  await doc.create();

  const parentDoc = await doc.get();
  
  const docSlides = await doc.getSlides();

  // First slide is created by default, when we initialise the Document, so we can just access it with docSlides[0] and modify it.
  docSlides[0].setTitle('Welcome to Slide 1!', { fontSize: 90 });
  
  // Creating new slides:
  const slide = await new Slide({
    parent: parentDoc,
    baseSlide: {
      name: 'Title - Center'
    },
    title: 'Welcome to the Second Slide!'
  });

  await slide.create();
};

main();

and run with:

node script.js

About

JavaScript API interface for Keynote (Mac slideshow app)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published