You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks for maintaining this! It seems I'm close to have a working setup, but I'm hitting some walls.
I'm running jupyterlab 4.1.2 with the jupyterlab_rise 0.42.0 plugin. I understand that this is not the original RISE that the decktape plugin was developed for, but I am hoping to make it work.
What I encountered so far:
Running decktape rise URL PDF gave me "Error: Could not find Chrome (ver. 122.0.6261.69)." with the hint to run npx puppeteer browsers install chrome. I did, which installed Chrome 122.0.6261.111, as I could tell from the puppeteer cache directory. The version is close enough, I figured that I can force decktape to use that one with PUPPETEER_BROWSER_REVISION=122.0.6261.111 decktape rise URL PDF.
Running jupyter notebook and then decktape rise http://localhost:8888/notebooks/path/file.ipynb?token=... outfile.pdf gives:
Error: Unable to activate the RISE DeckTape plugin for the address: http://localhost:8888/notebooks/01%20introduction/presentation-2024.ipynb?token=8b5c8273a0f373af642e1c43b32bd038900a77706e215cae
at createPlugin (file:///usr/lib/node_modules/decktape/decktape.js:341:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
I suspect this is because the selectors in rise.js do not work for the jupyterlab_rise plugin. There's not much use to go down this route for now, because even manually, I cannot start a presentation from there -- it does not start to render, which I blame on jupyterlab_rise.
Running jupyter lab and then decktape --load-pause=20000 --headless=false generic 'http://localhost:8888/lab?token=... opens jupyter lab in the puppeteer-controlled Chromium and gives me 20 seconds to start the presentation in full screen mode and adjust the zoom level. Then the plugin prints the first slide, switches to the second slide, and stops. It says "Printed 1 slides" and seems happy with it. Even when specifying --slides=1-22 it will only print the first slide. From generic.js, I can see that it is supposed to track changes to the DOM. In Reveal, as far as I understood, the changes are limited to some CSS classes being set or unset for some <section> elements. Is it possible that these changes go undetected? If I just add a minSlides option to generic.js that allows me to enforce a minimum number of exported slides, am I set? 🤔
/edit: Ok, the minSlides option actually works, it was easier than expected. Would still be interesting to investigate why the generic plugin does not detect the changes. Another interesting take for me would be to have a plugin that waits for a specific keypress from me to take a screenshot of the current slide, and another that signals the end of the presentation.
/edit: The generic plugin does not detect the changes because the presentation is embedded in an iframe. Luckily the URL of the iframe is predictable, so we can do:
Run jupyter lab and then decktape generic 'http://localhost:8888/rise/path/file.ipynb?token=.... This even works in headless mode. It has the opposite problem that the printing of pages never stops, but this can be fixed with --max-slides. Even more elegantly, we can just check whether window.location.hash changed; I will write a plugin for that.
The text was updated successfully, but these errors were encountered:
f0k
linked a pull request
Mar 28, 2024
that will
close
this issue
First of all, thanks for maintaining this! It seems I'm close to have a working setup, but I'm hitting some walls.
I'm running jupyterlab 4.1.2 with the jupyterlab_rise 0.42.0 plugin. I understand that this is not the original RISE that the decktape plugin was developed for, but I am hoping to make it work.
What I encountered so far:
decktape rise URL PDF
gave me "Error: Could not find Chrome (ver. 122.0.6261.69)." with the hint to runnpx puppeteer browsers install chrome
. I did, which installed Chrome 122.0.6261.111, as I could tell from the puppeteer cache directory. The version is close enough, I figured that I can force decktape to use that one withPUPPETEER_BROWSER_REVISION=122.0.6261.111 decktape rise URL PDF
.jupyter notebook
and thendecktape rise http://localhost:8888/notebooks/path/file.ipynb?token=... outfile.pdf
gives:jupyter lab
and thendecktape --load-pause=20000 --headless=false generic 'http://localhost:8888/lab?token=...
opens jupyter lab in the puppeteer-controlled Chromium and gives me 20 seconds to start the presentation in full screen mode and adjust the zoom level. Then the plugin prints the first slide, switches to the second slide, and stops. It says "Printed 1 slides" and seems happy with it. Even when specifying--slides=1-22
it will only print the first slide. Fromgeneric.js
, I can see that it is supposed to track changes to the DOM. In Reveal, as far as I understood, the changes are limited to some CSS classes being set or unset for some<section>
elements. Is it possible that these changes go undetected? If I just add aminSlides
option togeneric.js
that allows me to enforce a minimum number of exported slides, am I set? 🤔/edit: Ok, the minSlides option actually works, it was easier than expected. Would still be interesting to investigate why the generic plugin does not detect the changes. Another interesting take for me would be to have a plugin that waits for a specific keypress from me to take a screenshot of the current slide, and another that signals the end of the presentation.
/edit: The generic plugin does not detect the changes because the presentation is embedded in an iframe. Luckily the URL of the iframe is predictable, so we can do:
jupyter lab
and thendecktape generic 'http://localhost:8888/rise/path/file.ipynb?token=...
. This even works in headless mode. It has the opposite problem that the printing of pages never stops, but this can be fixed with--max-slides
. Even more elegantly, we can just check whetherwindow.location.hash
changed; I will write a plugin for that.The text was updated successfully, but these errors were encountered: