FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Bag to destination by finoradin · Pull Request #178 · LibraryOfCongress/bagit-python · GitHub

Bag to destination - #178

Open
finoradin wants to merge 2 commits into
LibraryOfCongress:masterfrom
finoradin:master
Open

finoradin wants to merge 2 commits into
LibraryOfCongress:masterfrom
finoradin:master

Conversation

Copy link
Copy Markdown

This could use some more testing, but it seems to work perfectly.

I added new arguments, "destination" and "name."

If destination is used, the contents of the source directory will all be copied into the "destination", and the bag will be saved there rather than bagging in place. If no "name" is supplied, the bag directory will be named whatever the name of the source directory is. If "name" is provided, it will be named that.

Most importantly, the manifest checksums are generated from the source files, not the copied files, so this provides a perfect chain of custody. We do this by modifying make_manifests to check if we are bagging to a destination. If so, it generates the checksums from the source and handles the paths accordingly so that they are correct in the manifest.

Could use some more testing, but I think it works!

Added new arguments "destination" and "name".

If destination is used, the contents of the source directory will all be copied into the "destination", and the bag will be saved there rather than bagging in place. If no "name" is supplied, the bag directory will be named whatever the name of the source directory is. If "name" is supplied, it will be named that.

Most importantly — the manifest checksums are generated from the source files, not the copied files, so this provides perfect chain of custody. We do this by modifying make_manifests to check if we are bagging to a destination, and if so, it generates them from the source, and handles the paths accordingly so that they are correct in the manifest.
and bug fix - i think my previous commit accidentally broke bag in place

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL