bagit-cr

Version, currently master branch1 version
  • master branchlatestDec 7, 2016

github.com/nodanaonlyzuul/bagit-cr

A proof-of-concept to write a bagit validation tool in crystal.

0 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  bagit-cr:
    github: nodanaonlyzuul/bagit-cr
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
0.19.4
License
MIT
Author
nodanaonlyzuul
Target
  • bagit-cr from src/bagit-cr.cr

Dependencies

This version declares no dependencies.

README

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

  • Install the crystal compiler.

  • clone this repository and build with crystal build --release src/bagit_validator.cr from the project's root. This will output the executable bagit_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)

  1. Fork it (https://github.com/nodanaonlyzuul/bagit-cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Please write tests to backup your work.

Contributors

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.