bagr
is a command line utility for interacting with
BagIt bags.
It is still under active development, but bag creation is feature complete.
The releases page has pre-built binaries that should work on common OSes and architectures. You do not need to install Rust to use them.
- Download and unzip the appropriate binary
- Execute
./bagr help
to verify it works
- Install Rust
- Execute:
cargo install bagr
- Verify the install:
bagr help
By default, bagr
will turn the contents of the current directory
into a bag by invoking:
bagr bag .
If instead, you'd like to create a bag by copying the contents of a source directory into a destination bag, then you can do by invoking:
bagr bag src/dir dst/bag
By default, sha512
is used; this algorithm can be changed using the
--digest-algorithm
option.
On Mac systems, .DS_Store
files can often sneak into unwanted
places. These files can be excluded from the bagging process by using
the --exclude-hidden-files
flag. Note this will delete hidden
files when creating a bag in place.
If you've modified the payload or tag files of a bag after creating
it, bagr
can also be used to recompute all of the digests and update
the appropriate manifest files by executing the following:
bagr rebag path/to/bag
By default, it will use the same digest algorithms as were originally
used in the bag. If you wish to change the algorithms, you can do so
by specifying the --digest-algorithm
option.
- Tag files must be UTF-8 encoded
fetch.txt
is not supported- BagIt versions prior to 1.0 are not supported
- Implement bag validation
- Support
fetch.txt
- Support BagIt 0.97
- Support BagIt Profiles
- Support non-UTF-8 character encodings