hrx

Version, currently master branch1 version
  • master branchlatestNov 8, 2020

github.com/straight-shoota/hrx

Parser for the [Human Readable Archive (HRX)](https://github.com/google/hrx) format

1 stars
2 dependents
License: Apache-2.0

Installation

# Add this to your shard.yml
dependencies:
  hrx:
    github: straight-shoota/hrx
    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.35.0
License
Apache-2.0
Author
Johannes Müller

Dependencies

This version declares no dependencies.

README

hrx

This shard provides a parser for the Human Readable Archive (HRX) format.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      hrx:
        github: straight-shoota/hrx
  2. Run shards install

Usage

require "hrx"

File.write("archive.hrx", "<==> foo.txt\nFOO\n<==> bar.txt\nBAR")
archive = File.open("archive.hrx", "r") do |io|
  HRX.parse(io)
end
archive["foo.txt"] # => HRX::File.new("foo.txt", "FOO", nil, 1, 6)
archive["bar.txt"] # => HRX::File.new("bar.txt", "BAR", nil, 3, 6)

Contributing

  1. Fork it (https://github.com/straight-shoota/hrx/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

Contributors