Sha256: a0ddd7d481eae49fe9ea4902ca43d52efccb8e3c6586056043c0b1acd8e9a8fa

Contents?: true

Size: 1.73 KB

Versions: 9

Compression:

Stored size: 1.73 KB

Contents

[![Build Status](https://travis-ci.org/sul-dlss/sdr-client.svg?branch=master)](https://travis-ci.org/sul-dlss/sdr-client)
[![Maintainability](https://api.codeclimate.com/v1/badges/1210855d46d4f424bf30/maintainability)](https://codeclimate.com/github/sul-dlss/sdr-client/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/1210855d46d4f424bf30/test_coverage)](https://codeclimate.com/github/sul-dlss/sdr-client/test_coverage)
[![Gem Version](https://badge.fury.io/rb/sdr-client.svg)](https://badge.fury.io/rb/sdr-client)

# Sdr::Client

This is a CLI for interacting with the Stanford Digital Repository API.
The code for the SDR API server is at https://github.com/sul-dlss/sdr-api

This provides a way for consumers to easily and correctly deposit files to the SDR without requiring access to the `/dor` NFS mount or to use Hydrus.  A primary design goal was for this to have as few dependencies as possible so that it can be easily distributed by `gem install sdr-client` and then it can be used as a CLI.

## Install

`gem install sdr-client`

## Usage

Log in:
```
sdr --service-url http://sdr-api-server:3000 login
```


Deposit a new object:
```
sdr --service-url https://sdr-api-server:3000 deposit --label 'hey there' \
  --admin-policy 'druid:bk123gh4567' \
  --collection 'druid:gh456kw9876' \
  --source-id 'googlebooks:stanford_12345' file1.png file2.png
```

Deposit a new object, providing metadata for files:
```
sdr --service-url https://sdr-api-server:3000 deposit --label 'hey there' \
  --files-metadata '{"image42.jp2":{"mime_type":"image/jp2"},"ocr.html":{"use":"transcription"}}'
  --admin-policy 'druid:bk123gh4567' \
  --collection 'druid:gh456kw9876' \
  --source-id 'googlebooks:stanford_12345' image42.jp2 ocr.html
```

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sdr-client-0.21.0 README.md
sdr-client-0.20.0 README.md
sdr-client-0.19.0 README.md
sdr-client-0.18.0 README.md
sdr-client-0.17.2 README.md
sdr-client-0.17.1 README.md
sdr-client-0.17.0 README.md
sdr-client-0.16.1 README.md
sdr-client-0.16.0 README.md