Command-line interface

openscm-zenodo

OpenSCM-Zenodo’s command-line interface

openscm-zenodo [OPTIONS] COMMAND [ARGS]...

Options

--log-level <log_level>
Options

DEBUG | INFO | WARNING | ERROR | EXCEPTION | CRITICAL

create-new-version

Create new version of a Zenodo record (i.e. a specific Zenodo deposition ID).

deposition_id is the deposition ID of any existing version DOI, but crucially not the DOI which represents all versions of the record (this won’t work). The printed value is the deposition ID of the DOI which represents the new, specific version of the record.

The deposit metadata should be a .json file. It will be read and validated before the new version is created.

openscm-zenodo create-new-version [OPTIONS] DEPOSITION_ID DEPOSIT_METADATA

Options

--zenodo-url <zenodo_url>

Zenodo server to which to upload.

Default

sandbox.zenodo.org

Options

sandbox.zenodo.org | zenodo.org

--token <token>

Arguments

DEPOSITION_ID

Required argument

DEPOSIT_METADATA

Required argument

Environment variables

ZENODO_TOKEN

Provide a default for --token

get-bucket

Get the bucket associated with a given Zenodo deposition ID (deposition_id)

The upload command can then be used to upload files to this bucket.

This command is handy when you know your deposition ID but you’ve forgotten the bucket address.

openscm-zenodo get-bucket [OPTIONS] DEPOSITION_ID

Options

--zenodo-url <zenodo_url>

Zenodo server to which to upload.

Default

sandbox.zenodo.org

Options

sandbox.zenodo.org | zenodo.org

--token <token>

Arguments

DEPOSITION_ID

Required argument

Environment variables

ZENODO_TOKEN

Provide a default for --token

upload

Upload a file to a Zenodo bucket

file_to_upload will be uploaded to the Zenodo bucket specified by bucket.

openscm-zenodo upload [OPTIONS] FILE_TO_UPLOAD BUCKET

Options

--root-dir <root_dir>

Root directory (removed from file paths before uploading)

--zenodo-url <zenodo_url>

Zenodo server to which to upload.

Default

sandbox.zenodo.org

Options

sandbox.zenodo.org | zenodo.org

--token <token>

Arguments

FILE_TO_UPLOAD

Required argument

BUCKET

Required argument

Environment variables

ZENODO_TOKEN

Provide a default for --token