#!/usr/bin/env ruby # frozen_string_literal: true require 'bagit' require 'docopt' require 'logger' logger = Logger.new(STDOUT) doc = <...] [-t ...] [-a ] BAGPATH bagit delete [-f ...] [-t ...] BAGPATH bagit remove [-t ...] BAGPATH bagit validate [-o] BAGPATH bagit manifest [-T] BAGPATH bagit list [--tags | --all] BAGPATH bagit -h | --version Options: -a A selected hashing algorithm. (md5, sha1, sha256) -h --help Show this help screen. --version Show version. -f File to add to/delete from bag. Repeatable. -t Tag (metadata) file to add to/delete/remove from bag. Repeatable. -T Force regeneration of tag manifest files. -o --oxum Validate against oxum only (quick validate). --tags List tag files. --all List all data and tag files. DOCOPT # Possible commands for bag-info write # # bagit new [--source-organization ] [--organization-address ] [--contact-name ] # [--contact-phone ] [--contact-email ] [--external-description ] # [--external-identifier ] [--group-identifier ] [--count ] # [--internal-sender-identifier ] [--internal-sender-description ] # [--bag-info-entry