ocrd.cli.zip module

OCR-D CLI: OCRD-ZIP (BagIt) management

ocrd zip

Bag/Spill/Validate OCRD-ZIP bags

ocrd zip [OPTIONS] COMMAND [ARGS]...

bag

Bag workspace as OCRD-ZIP at DEST

ocrd zip bag [OPTIONS] [DEST]

Options

-d, --directory <directory>

Workspace folder location.

Default:

.

-M, --mets-basename <mets_basename>

Basename of the METS file.

Default:

mets.xml

-i, --identifier, --id <identifier>

Required Ocrd-Identifier

-m, --mets <mets>

location of mets.xml in the bag’s data dir

-b, --base-version-checksum <base_version_checksum>

Ocrd-Base-Version-Checksum

-t, --tag-file <tag_file>

Add a non-payload file to bag

-Z, --skip-zip

Create a directory but do not ZIP it

-j, --processes <processes>

Number of parallel processes

Arguments

DEST

Optional argument

spill

Spill/unpack OCRD-ZIP bag at SRC to DEST

SRC must exist an be an OCRD-ZIP DEST must not exist and be a directory

ocrd zip spill [OPTIONS] SRC

Options

-d, --dest <dest>

Workspace folder location.

Default:

.

Arguments

SRC

Required argument

update

Recreate files containing checksums (manifest-sha512.txt, tagmanifest-sha512.txt and ‘Payload-Oxum’ contained in bag-info.txt) of an OCRD-ZIP.

Open the bag (zip file or directory) src, create or update its manifests/checksums and output to (zip file or directory) dest. It is also possible to output to src / overwrite src in place when --overwrite-flag is given.

ocrd zip update [OPTIONS] SRC [DEST]

Options

-o, --overwrite

overwrite bag in SRC

Arguments

SRC

Required argument

DEST

Optional argument

validate

Validate OCRD-ZIP

SRC must exist an be an OCRD-ZIP, either a ZIP file or a directory.

ocrd zip validate [OPTIONS] SRC

Options

-Z, --skip-unzip

Treat SRC as a directory not a ZIP

-B, --skip-bag

Whether to skip all checks of manifests and files

-C, --skip-checksums

Whether to omit checksum checks but still check basic BagIt conformance

-D, --skip-delete

Whether to skip deleting the unpacked OCRD-ZIP dir after valdiation

-j, --processes <processes>

Number of parallel processes

Arguments

SRC

Required argument