slides icon indicating copy to clipboard operation
slides copied to clipboard

Experimental: add an export npm script

Open nb opened this issue 6 years ago • 0 comments

Quite hacky at this point, though the script was successfully used to export few presentations I had.

Approach: uses puppeteer to open a URL and press Space, while taking screenshots. We assume that at each transition the URL changes. Once it stops changing, we assume there are no more slides.

Plenty of problems:

  • requires node;
  • assumes that the URL is visible without authentication and from the environment we are running the script from (there can be proxies, etc.);
  • no error handling – not sure what will happen if something breaks;
  • the assumption that the URL will change quickly enough is weak, I can see how it either finish too early or lead to an infinite loop. Knowing the number of slides in advance will be better;
  • assumes we have less than 1000 slides, so that we can take care of padding in file names. Seems the safest assumption compared to the ones above :) Can be lifted if we know the number of slides in advance;
  • Used local prettier rules, didn't setup the WordPress rules for now;
  • Resolution is hard-coded at Full HD – 1920:1080. Quite typical projector resolution these days.

I am posting more to start discussion and as a starting point than an attempt to merge it. Also curious how did you handle exporting State of the Word presentation.

nb avatar Jan 20 '20 13:01 nb