# ExtFit
[](https://github.com/arathunku/ext_fit/actions/workflows/elixir-build-and-test.yml)
[](https://hex.pm/packages/ext_fit)
[](https://hexdocs.pm/ext_fit)
[](https://github.com/arathunku/ext_fit/blob/main/LICENSE.md)
<!-- @moduledoc -->
`.fit` file decoder. See `ExtFit.Decode` module for more details and usage.
It's still in alpha-release and there's a slim chance that the format of returned
structs will change but if possible, will be avoided.
Currently used FIT profile can be seen in `ExtFit.Profile.Types` file.
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `ext_fit` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:ext_fit, "~> 0.1.0"}
]
end
```
## Usage
```elixir
{:ok, records} =
"my-file.fit"
|> File.read!()
|> ExtFit.Decode.decode()
# print first record
hd(record)
```
The docs can be found at <https://hexdocs.pm/ext_fit>.
FIT structs are very large, you might want to take a look at
[examples](https://github.com/arathunku/ext_fit/tree/main/examples) first!
https://github.com/arathunku/ext_fit/assets/749393/4c16c3ff-ba47-472b-9323-c9285842c2a8
(may not be visible on hexdocs, see [GitHub README](https://github.com/arathunku/ext_fit/tree/main?tab=readme-ov-file#usage))
## Contributing
Before contributing to this project, please read the CONTRIBUTING.md.
## License
Copyright © 2024 Michal Forys
This project is licensed under the MIT license.