zimeon / ocfl-py

OCFL tools in Python
MIT License
20 stars 7 forks source link

Make content extraction work with v1.1 #110

Closed zimeon closed 1 year ago

zimeon commented 1 year ago

Currently works with 1.0:

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

but not 1.1:

ocfl-py> ./ocfl-object.py --obj fixtures/1.1/good-objects/spec-ex-full --extract v2 --dstdir /tmp/bbb --verbose
Error - Root inventory is not valid (1 errors)
zimeon commented 3 weeks ago

Works fine now, syntax has changed:

ocfl-py> ./ocfl-object.py extract --objdir fixtures/1.1/good-objects/spec-ex-full --objver v2 --dstdir /tmp/bbb --verbose
INFO:root:Extracted v2 into /tmp/bbb
Extracted content for v2 in /tmp/bbb
ocfl-py> ls /tmp/bbb
empty.txt   empty2.txt  foo
ocfl-py> ./ocfl-object.py extract --objdir fixtures/1.0/good-objects/spec-ex-full --objver v2 --dstdir /tmp/aaa --verbose
INFO:root:Extracted v2 into /tmp/aaa
Extracted content for v2 in /tmp/aaa
ocfl-py> ls /tmp/aaa/
empty.txt   empty2.txt  foo