Skip to content

systemslab import notebook ​

Description Import a notebook exported with systemslab export notebook.
Usagesystemslab import notebook [OPTIONS] <SOURCE>

Description ​

The systemslab import notebook command creates a new notebook from a file written by systemslab export notebook (or the web UI's Export → JSON), with the exported title, default context or experiment, and body. The notebook list's Import button does the same, without --map. Its history starts over with the import. It prints the new notebook's URL, or just its id with --output-format short.

The notebook keeps referring to the same experiments, contexts and other entities. Importing onto the server it was exported from, they are all still there. On another server they may have different ids, for example because systemslab import experiment gave the copies new ones; point the notebook at them with --map OLD=NEW. Links to pages on the server the notebook was exported from are treated as references too.

Importing fails if the notebook refers to entities that don't exist on this server, unless --allow-missing-references is given; then they are kept, and shown like deleted entities.

To copy a whole context along with the notebooks about it, use systemslab export context instead.

bash
systemslab import notebook notes.json

# Point the notebook at the copy of an experiment imported on this server
systemslab import notebook notes.json \
  --map 0192f4e0-0000-7100-8000-000000000002=0193a1b2-0000-7100-8000-00000000000a

Options ​

OptionDefaultDescription
<SOURCE> The exported notebook, or - to read it from stdin.
--map <OLD=NEW> Replace references to the entity OLD with references to NEW, both given by id. The two must be the same kind of entity. Repeat the flag to replace several; each entity can be replaced, and replace another, only once.
--allow-missing-references Create the notebook even if entities it refers to don't exist on this server.
--workspace <WORKSPACE> Add the new notebook to this workspace, given by its slug or id. Repeat the flag to add it to several workspaces.

Common Options ​

OptionDefaultDescription
--systemslab-url The URL at which to access the systemslab server.
--colorauto Controls when color is used in the output. Possible values are auto, always, and never.
--output-formatlong Output format to use when outputting messages. long will result output designed to be human-readable while short is short output meant to be used within scripts.

Environment Variables ​

VariableDescription
SYSTEMSLAB_URLSpecify the URL used to contact the SystemsLab server. Equivalent to --systemslab-url.