Download the PHP package whikloj/bagittools without Composer
On this page you can find all versions of the php package whikloj/bagittools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download whikloj/bagittools
More information about whikloj/bagittools
Files in whikloj/bagittools
Package bagittools
Short Description A PHP library to manipulate and verify BagIt bags.
License MIT
Homepage https://github.com/whikloj/bagittools
Informations about the package bagittools
BagItTools
Introduction
BagItTools is a PHP implementation of the BagIt v1.0 specification (RFC-8493).
Features:
- Create new bag
- Load existing directory as a bag.
- Load archive file (.zip, .tar, .tar.gz, .tgz, *.tar.bz2)
- Validate a bag
- Add/Remove files
- Add/Remove fetch urls
- Add/Remove hash algorithms (md5, sha1, sha224, sha256, sha384, sha512, sha3-224, sha3-256, sha3-384, sha3-512)
- Generate payload for all data/ files for all hash algorithms (depending on PHP support)
- Generate tag manifests for all root level files and any additional tag directories/files.
- Add/Remove tags from bag-info.txt files, maintains ordering of tags loaded.
- Generates/updates payload-oxum and bagging-date.
- Passes all bagit-conformance-suite tests.
- Create an archive (zip, tar, tar.gz, tgz, tar.bz2)
- In-place upgrade of bag from v0.97 to v1.0
Installation
Composer
Clone from Github
Dependencies
All dependencies are installed or identified by composer.
Some PHP extensions are required and this library will not install if they cannot be found in the default PHP installation (the one used by composer).
The required extensions are:
Usage
You can integrate BagItTools into your own code as a library using the API, or use the CLI commands for some simple functionality.
Command line
Validating a bag
This will output a message as to whether the bag is or is NOT valid. It will also respond with an appropriate exit code (0 == valid, 1 == invalid).
If you add the -v
flag it will also print any errors or warnings.
This can command can be used with the bagit-conformance-suite like this
API
Create a new bag
As this is a v1.0 implementation, by default bags created use the UTF-8 file encoding and the SHA-512 hash algorithm.
Maintainer
License
MIT
Development
To-Do:
- CLI interface to handle simple bag CRUD (CReate/Update/Delete) functions.
All versions of bagittools with dependencies
php Version >=8.0
ext-curl Version *
ext-zip Version *
ext-mbstring Version *
ext-intl Version *
symfony/console Version ^5.4