# [Rattletrap][] [![Windows build badge][]][windows build] [![Build badge][]][build] Rattletrap parses and generates [Rocket League][] replays. ## Install Rattletrap does not yet offer compiled binaries for download. To install it, first install [Stack][]. Then download or clone this repository and run `stack --install-ghc install`. ## Parse Rattletrap can parse (decode) Rocket League replays and output them as JSON. ``` sh > rattletrap decode input.replay output.json # or > rattletrap decode input.replay > output.json # or > rattletrap.decode < input.replay > output.json ``` The resulting JSON is minified, but extremely large. A 4.3 MB replay file turns into a 123 MB JSON file. To easily view the file, use a JSON pretty printer and a pager. For example: ``` sh > cat output.json | python -m json.tool | less ``` ## Generate Rattletrap can also generate (encode) Rocket League replays from JSON files. ``` sh > rattletrap encode input.json output.replay # or > rattletrap encode input.json > output.replay # or > rattletrap.encode < input.json > output.replay ``` If the JSON was generated by Rattletrap, the resulting replay should be identical to the original. ## Modify By inserting another program between parsing and generating, Rattletrap can be used to modify replays. ``` sh > rattletrap decode < original.replay | modify-replay-json | rattletrap encode > modified.replay ``` [Rattletrap]: https://github.com/tfausak/rattletrap [Windows build badge]: https://ci.appveyor.com/api/projects/status/github/tfausak/rattletrap?branch=master&svg=true [windows build]: https://ci.appveyor.com/project/TaylorFausak/rattletrap [Build badge]: https://travis-ci.org/tfausak/rattletrap.svg?branch=master [build]: https://travis-ci.org/tfausak/rattletrap [Rocket League]: https://www.rocketleaguegame.com [Stack]: https://docs.haskellstack.org/en/stable/README/