Package: mets-retriever
mets-retrieverAboutCLI tool for bulk downloadingArchivematicaMETS files.Unlike Gloria the flat-coated retriever mix,mets-retrieveris all about fetching.UsageAfter installing with pip (see below), use theretrieve-metscommand.retrieve-metshas two subcommands,fetch-allandfetch-one. Both
subcommands have some common arguments:METS files are fetched to a directory specified with the--output-dirargument. If one is not provided, amets_filesdirectory will be created
in the current directory and METS files will be written there.Storage Service credentials must be included using the--ss-url,--ss-user-name, and--ss-api-keyarguments for both commands. By default
these default to values from the Archivematica Docker development environment.If the--sidecarflag is passed, a sidecar txt file will be written
alongside each METS file in the output directory with additional metadata about
the AIP not found in the METS file, namely, the storage location UUID and the
UUIDs of any AIP replicas.Usage: retrieve-mets [OPTIONS] COMMAND [ARGS]...

  METS Retriever CLI tool

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  fetch-all  Fetch all METS files not already retrieved.
  fetch-one  Fetch single METS file, even if it's already been retrieved.fetch-allTo fetch all AIP METS files that have not already been retreived, use thefetch-allsubcommand. E.g.:retrieve-metsfetch-allOnce a METS file is fetched, its UUID is stored in a local SQLite database so
that it will not be fetched again on subsequent runs.This command accepts several optional arguments:Usage: retrieve-mets fetch-all [OPTIONS]

  Fetch all METS files not already retrieved.

Options:
  --ss-url TEXT         Storage Service host URL  [default:
                        http://127.0.0.1:62081; required]
  --ss-user-name TEXT   Storage Service username  [default: test;
                        required]
  --ss-api-key TEXT     Storage Service API key  [default: test; required]
  --output-dir TEXT     Path to output directory  [default: mets_files;
                        required]
  --sidecar             Write sidecar file for each METS with Storage
                        Location and AIP replica UUIDs
  --with-replicas-only  Only retrieve METS for an AIP if a replica has 
                        also been stored
  --help                Show this message and exit.fetch-oneTo fetch (or re-fetch) a single AIP METS file, use thefetch-onesubcommand.
E.g.:retrieve-metsfetch-one68ee3c66-d90a-4b9a-a33c-2e4e6d339ff7This command accepts several optional arguments:Usage: retrieve-mets fetch-one [OPTIONS] AIP_UUID

  Fetch single METS file, even if it's already been retrieved.

Options:
  --ss-url TEXT       Storage Service host URL  [default:
                      http://127.0.0.1:62081; required]
  --ss-user-name TEXT Storage Service username  [default: test; required]
  --ss-api-key TEXT   Storage Service API key  [default: test; required]
  --output-dir TEXT   Path to output directory  [default: mets_files;
                      required]
  --sidecar           Write sidecar file for each METS with Storage 
                      Location and AIP replica UUIDs
  --help              Show this message and exit.InstallInstall mets-retriever packagemets-retrieverrequires Python 3.6+.Via PyPIpipinstallmets-retrieverManuallyDownload this repo:gitclonehttps://github.com/artefactual-labs/mets-retriever.gitChange into the cloned directory and install:cdmets-retriever/
pipinstall.DevelopmentInstallationFor development, it may be useful to installmets-retrieverwithpip install -e ., which will apply changes made to the source code
immediately.TestingTo run all tests with tox:toxOr run tests directly with pytest:pipinstall-rrequirements/test.txt
pytestPublishing to PyPIThis repository contains aMakefilewith commands to aid in
building packages and publishing toPyPI.To check that the package is valid:makepackage-checkTo upload the package to PyPI (this requires PyPI credentials and being
listed as a collaborator on theauditmaticaproject):makepackage-uploadTo clean up package distribution files:makeclean