Questions about directly executing a Pluto notebook

I have several Pluto notebooks. Sometimes I want to execute them directly in Julia rather than through the Pluto server.

If the notebook uses the Pluto package manager, is there a single function I can call to run the notebook, or must I call Pluto.activate_notebook_environment first?

Also, is there a way to test whether the notebook is being run directly from Julia or through the Pluto server? For example, when running directly in Julia I want the output to go to a file.

Thanks.

1 Like

Yes. You can use isdefined(Main, :PlutoRunner).

1 Like

Excellent. That does the trick. Thanks.

1 Like