github.com/nodanaonlyzuul/bagit-cr
master / published Dec 7, 2016 / repository
A proof-of-concept to write a bagit validation tool in crystal.
bagit-cr
This is a bagit validator.
It's not ready for production but I am using this project to get acquainted with the crystal programming language.
Building
-
clone this repository and build with
crystal build --release src/bagit_validator.crfrom the project's root. This will output the executablebagit_validator.
Usage
$ ./bagit_validator ~/Desktop/good_bag
This bag is valid
$ ./bagit_validator ~/Desktop/bag-with-bad-checksum
This bag is not valid:malformed checksum for: picard.jpeg
$ ./bagit_validator ~Desktop/bag-with-stranger-in-manifest
This bag is not valid:manifest lists file not contained in bag: imnothere.jpg
Contributing (please)
- Fork it (https://github.com/nodanaonlyzuul/bagit-cr/fork)
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Please write tests to backup your work.
Contributors
- nodanaonlyzuul - creator, maintainer
Acknowledgements
This is based on the Ruby gem tipr/bagit. I am just trying to see how fast a crystal implementation will validate compared to Ruby's.