Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/watzon/diff
Pure Crystal implementation of various diffing algorithms
https://github.com/watzon/diff
crystal crystal-lang crystal-language diff git myers-algorithm
Last synced: 15 days ago
JSON representation
Pure Crystal implementation of various diffing algorithms
- Host: GitHub
- URL: https://github.com/watzon/diff
- Owner: watzon
- License: mit
- Created: 2020-05-12T19:19:49.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-12T19:31:40.000Z (over 4 years ago)
- Last Synced: 2024-10-04T21:33:07.249Z (about 1 month ago)
- Topics: crystal, crystal-lang, crystal-language, diff, git, myers-algorithm
- Language: Crystal
- Size: 5.86 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Diff
Pure Crystal implementation of various diffing algorithms. Currently includes:
- Myers
- Myers (linear)## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
diff:
github: watzon/diff
```2. Run `shards install`
## Usage
```crystal
require "diff"a = File.open("foo.cr")
b = File.open("foo_edited.cr")diff = Diff.new(a, b, Diff::MyersLinear)
puts diff.to_s
```## Contributing
1. Fork it ()
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
- [Chris Watson](https://github.com/watzon) - creator and maintainer