Command-line interface#

Shared command-line interface#

swh deposit#

Deposit main command

swh deposit [OPTIONS] COMMAND [ARGS]...

Commands

admin

Server administration tasks (manipulate…

list

Client deposit listing

metadata-only

Deposit metadata only upload

status

Deposit’s status

upload

Software Heritage Public Deposit Client

Administration utilities#

swh deposit admin#

Server administration tasks (manipulate user or collections)

swh deposit admin [OPTIONS] COMMAND [ARGS]...

Options

-C, --config-file <config_file>#

Optional extra configuration file.

--platform <platform>#

development or production platform

Options:

development | production

collection#

Manipulate collections.

swh deposit admin collection [OPTIONS] COMMAND [ARGS]...
create#
swh deposit admin collection create [OPTIONS]

Options

--name <name>#

Required Collection’s name

list#

List existing collections.

This entrypoint is not paginated yet as there is not a lot of entry.

swh deposit admin collection list [OPTIONS]

deposit#

Manipulate deposit.

swh deposit admin deposit [OPTIONS] COMMAND [ARGS]...
reschedule#

Reschedule the deposit loading

This will:

  • check the deposit’s status to something reasonable (failed or done). That means that the checks have passed alright but something went wrong during the loading (failed: loading failed, done: loading ok, still for some reasons as in bugs, we need to reschedule it)

  • reset the deposit’s status to ‘verified’ (prior to any loading but after the checks which are fine) and removes the different archives’ identifiers (swh-id, …)

  • trigger back the loading task through the scheduler

swh deposit admin deposit reschedule [OPTIONS]

Options

--deposit-id <deposit_id>#

Required Deposit identifier

user#

Manipulate user.

swh deposit admin user [OPTIONS] COMMAND [ARGS]...
create#

Create a user with some needed information (password, collection)

If the collection does not exist, the collection is then created alongside.

The password is stored encrypted using django’s utilities.

swh deposit admin user create [OPTIONS]

Options

--username <username>#

Required User’s name

--password <password>#

(Deprecated) Desired user password (plain).

--firstname <firstname>#

User’s first name

--lastname <lastname>#

User’s last name

--email <email>#

User’s email

--collection <collection>#

User’s collection

--provider-url <provider_url>#

Provider URL

--domain <domain>#

The domain

exists#

Check if user exists.

swh deposit admin user exists [OPTIONS] USERNAME

Arguments

USERNAME#

Required argument

list#

List existing users.

This entrypoint is not paginated yet as there is not a lot of entry.

swh deposit admin user list [OPTIONS]

Deposit client tools#

swh deposit#

Software Heritage Public Deposit Client

Create/Update deposit through the command line.

More documentation can be found at https://docs.softwareheritage.org/devel/swh-deposit/getting-started.html.

swh deposit [OPTIONS]

Options

--url <url>#

(Optional) Deposit server api endpoint. By default, https://deposit.softwareheritage.org/1

--username <username>#

Required (Mandatory) User’s name

--password <password>#

Required (Mandatory) User’s associated password

--archive <archive>#

(Optional) Software archive to deposit

--metadata <metadata>#

(Optional) Path to xml metadata file. If not provided, this will use a file named <archive>.metadata.xml

--archive-deposit, --no-archive-deposit#

Deprecated (ignored)

--metadata-deposit, --no-metadata-deposit#

Deprecated (ignored)

--collection <collection>#

(Optional) User’s collection. If not provided, this will be fetched.

--slug <slug>#

(Deprecated) (Optional) External system information identifier. If not provided, it will be generated

--create-origin <create_origin>#

(Optional) Origin url to attach information to. To be used alongside –name and –author. This will be generated alongside the metadata to provide to the deposit server.

--metadata-provenance-url <metadata_provenance_url>#

(Optional) Provenance metadata url to indicate from where the metadata is coming from.

--partial, --no-partial#

(Optional) The deposit will be partial, other deposits will have to take place to finalize it.

--deposit-id <deposit_id>#

(Optional) Update an existing partial deposit with its identifier

--swhid <swhid>#

(Optional) Update existing completed deposit (status done) with new metadata

--replace, --no-replace#

(Optional) Update by replacing existing metadata to a deposit

--verbose, --no-verbose#

Verbose mode

--name <name>#

Software name

--author <author>#

Software author(s), this can be repeated as many times as there are authors

-f, --format <output_format>#

Output format results.

Options:

logging | yaml | json

swh deposit#

Deposit’s status

swh deposit [OPTIONS]

Options

--url <url>#

(Optional) Deposit server api endpoint. By default, https://deposit.softwareheritage.org/1

--username <username>#

Required (Mandatory) User’s name

--password <password>#

Required (Mandatory) User’s associated password

--deposit-id <deposit_id>#

Required Deposit identifier.

-f, --format <output_format>#

Output format results.

Options:

logging | yaml | json

swh deposit#

Deposit metadata only upload

swh deposit [OPTIONS]

Options

--url <url>#

(Optional) Deposit server api endpoint. By default, https://deposit.softwareheritage.org/1

--username <username>#

Required (Mandatory) User’s name

--password <password>#

Required (Mandatory) User’s associated password

--metadata <metadata_path>#

Required Path to xml metadata file

-f, --format <output_format>#

Output format results.

Options:

logging | yaml | json