fcrepo-exts / fcrepo-import-export

Apache License 2.0
15 stars 19 forks source link

CLI Argument for BagIt Hash Algorithms #148

Closed mikejritter closed 4 years ago

mikejritter commented 4 years ago

Resolves: https://jira.lyrasis.org/browse/FCREPO-3366


Notes

I didn't add a short option, but could if a good letter can be chosen (a, d, h are taken -- maybe capitalizing one is the way to go).


Testing

  1. Start a fresh fedora repository, e.g. with fcrepo4-docker FEDORA_TAG=5.1.0 docker-compose up -d
  2. Create a binary in the repository
  3. Create a bag-config.yml for export
    bag-info.txt:
     Source-Organization: fcrepo-import-export
     Organization-Address: localhost
     External-Description: BagIt Bag
  4. Run the exporter, specifying the hash algorithms you want to use
    java -jar target/fcrepo-import-export-0.4.0-SNAPSHOT.jar --mode export --resource http://localhost:8080/fcrepo/rest --dir fcrepo-3366  --binaries --bag-profile beyondtherepository --bag-config bag-config.yml --bag-algorithms sha1,sha256 --user fedoraAdmin:secret3
  5. Check the exported bag only has the algorithms specified
mikejritter commented 4 years ago

@awoods resolved the checkstyle issues with the latest commit