Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc committed Oct 5, 2024
1 parent 3d14ba3 commit 44eb3ee
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@

**jupyter_app_launcher** helps users customize the JupyterLab launcher with a simple YAML file. Users can add custom entries to the launcher to:

- Open a predefined notebook or markdown file.
- Open a predefined notebook with selected widget factory
- Open a markdown file.
- Render a notebook in dashboard mode
- Open a notebook with Voila
- Start a local web server and open the predefined URL.
- Open a remote URL (as widget tab in Jupyter or in new browser window).
- Open terminal and run a predefined command

https://user-images.githubusercontent.com/4451292/191499842-3b3aae7b-dd61-416b-9958-6490c1e220c7.mp4

Expand Down
29 changes: 28 additions & 1 deletion docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,16 @@ This launcher entry will create a new notebook in the current working directory
- title: Notebook example
description: Example of opening a notebook in dashboard mode without Voila
type: notebook
source: ../../samples/sample.ipynb
cwd: ../../samples
type: notebook
args:
widget-type: 'default'
catalog: Notebook catalog
- ``type`` = ``notebook``
- ``source``: Path to the notebook (can be stored anywhere) which will be copied to the current working directory of *JupyterLab*. It can be an absolute path or a relative path to the directory of the configuration file.
- ``args`` (Optional): By default the notebook will be opened with the default notebook view. Users can customize the document widget to open the notebook by setting the ``widget-type`` argument. For example, to open the notebook with the Voila preview widget, set ``widget-type`` to ``Voila Preview``.
- ``cwd``: Unused.

.. figure:: images/notebook.gif
Expand Down Expand Up @@ -309,6 +312,30 @@ This launcher entry will run predefined JupyterLab commands.

The execution of commands will be stopped if a command fails, and the error message will be shown in a dialog.


--------------------------------------
Open JupyterLab terminal.
--------------------------------------

This launcher entry will open JupyterLab terminal and execute the defined command.

.. code-block:: yaml
- title: Terminal example
description: Example of opening JupyterLab terminal
type: terminal
source: 'ls -l'
cwd: '../'
args:
reuse: true
catalog: Config 2
- ``type`` = ``terminal``
- ``source``: the command to be executed at startup
- ``cwd``: The CWD of the terminal. It can be an absolute path or a relative path to the CWD of JupyterLab.
- ``args`` (Optional): By default the terminal session will be created independently, set ``reuse`` to ``true`` to use the same terminal session.


Running subprocesses manager
======================================================

Expand Down

0 comments on commit 44eb3ee

Please sign in to comment.