Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Bag Manifests #61

Open
ntallman opened this issue Mar 31, 2016 · 4 comments
Open

Updating Bag Manifests #61

ntallman opened this issue Mar 31, 2016 · 4 comments

Comments

@ntallman
Copy link

Is it possible to use bagit-python from the command line to update bag manifests? Or is that only possible through a python script? My workflow involved adding additional information to bag-info.txt after bagging which causes a checksum mismatch with the tag manifest. I'd like to be able to re-generate the manifests after this step. Thanks!

@ntallman
Copy link
Author

I solved the problem by changing the workflow, but I'd still be interested to know if this is doable. Thanks.

@johnscancella
Copy link
Contributor

It does not currently have this ability in the command line. However, the save method in the library does update the tag manifests. see https://github.com/LibraryOfCongress/bagit-python/blob/master/bagit.py#L263-L319

@acdha
Copy link
Member

acdha commented May 9, 2017

One useful case for this: upgrading bags to add stronger manifests – ideally we could avoid reading the files more than once by doing something like calculating all of the hashes at the same time, verifying the existing ones, and saving the new ones.

@stain
Copy link

stain commented Oct 29, 2020

+1 to add the option to do an in-place update e.g. update manifests and bag-info.txt after some files have changed in existing bagit structure.

At least a warning should be printed if bagit.py is invoked on a folder already containing bagit.txt - of course a BagIt can contain a BagIt but it might not be what they meant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants