fonsp/PlutoUtils.jl

Standalone Electron app?

AshtonSBradley opened this issue · 3 comments

What would it take to make a Pluto notebook into a standalone app using packagecompiler.jl? It seems like you would want to be able to open a particular notebook file by passing the path as an argument… I guess there are probably many more steps (I am not an expert)

  • Maybe using Electron?
  • Or could an app open a default browser? If the code cells could be hidden, then I guess the scope would be limited to Pluto interactivity?

I would be keen to try something, just not sure the best strategy

fonsp commented

First thing to do is a launchmyplutoapp.jl standalone script that launches the notebook:

fonsp/Pluto.jl#236 heyy that's you!

The new Electron.jl package looks cool, you can use it to open the URL. Might be a heavy dependency, but on the other hand, Pluto needs the most recent version of either Firefox or Chrome, so using Electron.jl guarantees that it works (it uses recent Chrome).

Otherwise, use DefaultApplication.jl which has URL support or wait for me to get around to fonsp/Pluto.jl#190.

fonsp commented

Then to compile: I have no clue! Curious to hear how it goes, your experience would be useful for me/others as well.

It would be great if you could also precompile the notebook code. This might be tricky, because Pluto spawns the notebook process itself, but if I remember correctly, the process needs to be started with a bigger "system image" or something that includes the precompiled code. But lets see how it goes!

EDIT: it's possible to pass arguments to the notebook process: https://github.com/fonsp/Pluto.jl/pull/341/files#diff-051418b4b096d180d81593e6537c6efeR89

So... whats the update on the standalone app?