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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ocfl_rehydration-1.0.0.tar.gz
.
File metadata
- Download URL: ocfl_rehydration-1.0.0.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 451f6219da1dbb2c37d399e07c39124d00875230167527f0b03bd36c5f3d6aec |
|
MD5 | 6e94a69511678fa01339bd5dcca67296 |
|
BLAKE2b-256 | 1a93b4d83f6be7b8096caef548c4409493f75a928c71b6e20070517aa98d8244 |
File details
Details for the file ocfl_rehydration-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: ocfl_rehydration-1.0.0-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6423a50f68f71a980697053204d6f93605e2d0c8f7baf4a76ea7d20b94f26a90 |
|
MD5 | daa8b39d4d7f6015ff3e6c17a25620e5 |
|
BLAKE2b-256 | 93fb36e3d7d1cf264fb88c1daf757e02cf8e7854be985b1cd7952b049f5db38f |