Appearance
systemslab export notebook
| Description | Export a notebook as a JSON file. |
|---|---|
| Usage | systemslab export notebook [OPTIONS] <NOTEBOOK> |
Description
The systemslab export notebook command writes a notebook to a JSON file: its title, default context or experiment, and body, along with the names of the entities it refers to. Import the file with systemslab import notebook, on the same server or another one.
A notebook refers to experiments, contexts and other entities without holding their data, and its history isn't exported. To edit a notebook as a file, use systemslab notebook pull instead, which writes markdown that systemslab notebook push sends back.
Links to entity pages on the server being exported from, such as https://<server>/experiment/<id>, become mentions of those entities in the export, so that importing it elsewhere points them at the right copies. Links to other pages on the server, or with a query or fragment, are kept as they are.
The notebook page in the web UI can download the same file with Export → JSON.
bash
# Copy a notebook to another server
systemslab export notebook 0192f4e0-0000-7f00-8000-000000000009 -o notes.json
systemslab --systemslab-url https://other.example.com import notebook notes.jsonOptions
| Option | Default | Description |
|---|---|---|
<NOTEBOOK> | The id of the notebook to export (see systemslab notebook list). | |
-o, --output | - | The file to write the notebook to. Overwritten if it exists. Can be - to write to stdout. |
Common Options
| Option | Default | Description |
|---|---|---|
--systemslab-url | The URL at which to access the systemslab server. | |
--color | auto | Controls when color is used in the output. Possible values are auto, always, and never. |
--output-format | long | 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
| Variable | Description |
|---|---|
SYSTEMSLAB_URL | Specify the URL used to contact the SystemsLab server. Equivalent to --systemslab-url. |