ocfl-py
ocfl-py copied to clipboard
Harvard 3: Get content/files from individual object
As a part of our bulk download process, we would like to pull down individual OCFL objects from S3 to local disk, then use ocfl-py to inspect and pull out specific files.
This will involve three new functions in ocfl-py:
- load individual object
- list files in object (optional version arg, default head)
- get content (arg: logical path, optional version arg)
This issue is to design the CLI interaction for step 3.
Current extract functionality (broken for v1.1 see https://github.com/zimeon/ocfl-py/issues/110) supports only extraction of all content:
ocfl-py> ./ocfl-object.py --obj fixtures/1.0/good-objects/spec-ex-full --extract v2 --dstdir /tmp/aaa
INFO:ocfl.object:Extracted v2 into /tmp/aaa
Extracted content for v2 in /tmp/aaa
ocfl-py> tree /tmp/aaa
/tmp/aaa
├── empty.txt
├── empty2.txt
└── foo
└── bar.xml
1 directory, 3 files
I assume that in absence of version argument it should extract the latest version?
Somehow we need at least one more parameter to specify the logical path to extract