slims_lisp.slims CLI

slims-lisp

A high-level CLI for SLIMS REST API
slims-lisp [OPTIONS] COMMAND [ARGS]...

eln

CLI for the Electronic Lab Notebook (ELN)
slims-lisp eln [OPTIONS] COMMAND [ARGS]...

add-attachment

Upload a file to a an existing ELN experiment attachment step.

Return:

Returns the HTTP POST request response.

Example:

$ slims-lisp eln add-attachment –url <your_slims_url> –proj <your_project_name> –exp <your_experiment_name> –step <your_attachment_step_name> –file <path/to/your/file>

slims-lisp eln add-attachment [OPTIONS]

Options

--url <url>

SLIMS REST URL. ex: https://<your_slims_address>/rest/rest [required]

--proj <proj>

Project name (if any).

--exp <exp>

Experiment name. [required]

--step <step>

Experiment step name. [default: results; required]

--active <active>

Search only in active or inactive steps (or in both). [default: true]

Options

true|false|both

--file <file>

Path to the file that will be uploaded. [required]

--attm <attm>

A name to give to the attachement that will be created. [default: same as –file]

-v, --verbose

Print various messages.

-u, --username <username>

SLIMS user name. [required]

-p, --pwd <pwd>

SLIMS password. [required]

add-dataset

Create a new ELN experiment attachment step and upload multiple files to it (useful to upload a whole dataset containing multiple data and/or metadata files at once).

Return:

Returns HTTP POST requests responses in a dictionary.

Example:

$ slims-lisp eln add-dataset –url <your_slims_url> –proj <your_project_name> –exp <your_experiment_name> –files <file1>,<file2>,<file3> –title <your_dataset_name>

slims-lisp eln add-dataset [OPTIONS]

Options

--url <url>

SLIMS REST URL. ex: https://<your_slims_address>/rest/rest [required]

--proj <proj>

Project name (if any).

--exp <exp>

Experiment name. [required]

--files <files>

Comma-delimited paths to the files that will be uploaded. [required]

--title <title>

The title of the attachment block that will be created for the dataset in SLIMS. [default: dataset_<ISO 8601 timestamp>]

-v, --verbose

Print various messages.

-u, --username <username>

SLIMS user name. [required]

-p, --pwd <pwd>

SLIMS password. [required]

fetch-attachment

Download a file from an ELN experiment attachment step.

Return:

Returns the HTTP GET request response.

Output:

Generates two files (by default in the working directory):

-<output_dir>/<attm> The requested file

-<output_dir>/<attm>_metadata.txt Associated metadata in a JSON format

Example:

$ slims-lisp eln fetch-attachment –url <your_slims_url> –proj <your_project_name> –exp <your_experiment_name> –step <your_attachment_step_name> –attm <your_attachment_name>

slims-lisp eln fetch-attachment [OPTIONS]

Options

--url <url>

SLIMS REST URL (ex: https://<your_slims_address>/rest/rest). [required]

--proj <proj>

Project name (if any).

--exp <exp>

Experiment name. [required]

--step <step>

Experiment step name. [default: data_collection; required]

--active <active>

Search only in active or inactive steps (or in both). [default: true]

Options

true|false|both

--attm <attm>

Attachment name. [required]

--linked <linked>

Search only linked or unlinked attachments (or both). [default: true]

Options

true|false|both

--output_dir <output_dir>

Output directory [default: working directory].

-v, --verbose

Print various messages.

-u, --username <username>

SLIMS user name. [required]

-p, --pwd <pwd>

SLIMS password. [required]