Skip to main content

Utility for reconstituting OCFL objects

Project description

OCFL Rehydration

OCFL Rehydration reconstitutes DRS objects from their OCFL representation

This tool has no dependencies on any external services such as the DRS database or storage. The expectation is that the OCFL object root directory for a DRS object exists on local disk. This tool takes as input the location of the OCFL object root directory and recreates the a representation of the DRS object in a form similar to what the depositor initially supplied in the DRS batch for ingest. Specifically, the resultant object is created in a directory named after the supplied object name; the data files are created with their supplied file names within directories named with their supplied names.

Build

The tool is a python command-line application that is designed to be run within a Docker container. To build the Docker image:

docker build -t rehydrate:latest .

Usage

To run the application after a Docker image has been built as detailed above:

docker run --rm --mount type=bind,source=${PWD},target=/tmp -it rehydrate -h

usage: main.py [-h] -i INPUT_DIR -o OUTPUT_DIR

Converts the OCFL form of a DRS Object and reconstitutes (rehydrates) a form expected by curators. The input is the OCFL
object root directory of object to rehydrate.

options:
  -h, --help            show this help message and exit
  -i INPUT_DIR, --input_dir INPUT_DIR
                        Local directory containing the OCFL Object root of the object to rehydrate
  -o OUTPUT_DIR, --output_dir OUTPUT_DIR
                        Local directory where rehydrated object will be written

Example

The directory '102559752' is the OCFL object root directory for a DRS object. OCFL object root directories contain the top-level 'inventory.json', the object version namaste file (e.g. '0=ocfl_object_1.0') and OCFL version directories.

docker run --rm --mount type=bind,source=${PWD},target=/tmp -it rehydrate -i /tmp/input/102559752 -o /tmp/output

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ocfl_rehydration-1.1.0b1.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

ocfl_rehydration-1.1.0b1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file ocfl_rehydration-1.1.0b1.tar.gz.

File metadata

  • Download URL: ocfl_rehydration-1.1.0b1.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for ocfl_rehydration-1.1.0b1.tar.gz
Algorithm Hash digest
SHA256 1e54938cc8a1ab0a09b6f3c402719bd02d8d29c61066f610606f0055296021aa
MD5 f0a2c3831fdce39ad1433de9ebb8a4a8
BLAKE2b-256 153cf1c24eeb9b775011e818fd4630faaf9c6788c621b41b36a0478e9c296e90

See more details on using hashes here.

File details

Details for the file ocfl_rehydration-1.1.0b1-py3-none-any.whl.

File metadata

File hashes

Hashes for ocfl_rehydration-1.1.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 3a73a8e49d1893ca289452ac8ef16b11fb5c86d522173a7110c647c74a73fa87
MD5 fb378191770dac3de09eb9138977517e
BLAKE2b-256 b4b683e88998928da0635acf03715373b98385b6d03960566919c8bf2dd1489c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page