Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eulixir/ex_cnab
A CNAB file helper. This library aims to help your bank or cooperative read, decode, display, and perform various operations on a CNAB file
https://github.com/eulixir/ex_cnab
cnab elixir open-source phoenix
Last synced: 3 days ago
JSON representation
A CNAB file helper. This library aims to help your bank or cooperative read, decode, display, and perform various operations on a CNAB file
- Host: GitHub
- URL: https://github.com/eulixir/ex_cnab
- Owner: eulixir
- License: mit
- Created: 2023-03-27T23:11:27.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-17T19:41:28.000Z (12 months ago)
- Last Synced: 2024-12-20T22:42:08.638Z (11 days ago)
- Topics: cnab, elixir, open-source, phoenix
- Language: Elixir
- Homepage: https://hexdocs.pm/ex_cnab/
- Size: 200 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
# ExCnab
ExCnab makes it easy to read and process CNAB files.
> **This README follows the main branch, which may not be the currently published version**. Here are the
> [docs for the latest published version of ExCnab](https://hexdocs.pm/ex_cnab/ExCnab240.html).## Installation
#### To install in all environments (useful for generating seed data in dev/prod):
In `mix.exs`, add the ExMachina dependency:
```elixir
def deps do
[
{:ex_cnab, "~> 1.3.6"},
]
end
```## Overview
[Check out the docs](https://hexdocs.pm/ex_cnab/ExCnab240.html) for more details.
Read and Build info from file:
```elixir
defmodule MyApp.CnabParser do
import ExCnab240def run(filepath), do: decode(filepath, %{})
endoutput:
{:ok, %{
header: %{
# Content
},
details: %{
# Content
},
footer: %{
# Content
},
additional_info: %{
# Content
}
}}
``````elixir
defmodule MyApp.CnabParser do
import ExCnab240def run(decoded_cnab), do: encode(decoded_cnab, %{})
endoutput:
{:ok, %{content: "xxxx...", filename: "JHVAABBDD.ret"}}
``````elixir
defmodule MyApp.GetDetailsType do
import ExCnab240def run(decoded_cnab), do: find_details_type(cnab_file)
end
output:
["A", "B"]
```## Contributing
Before opening a pull request, please open an issue first.
$ git clone https://github.com/joaopealves/ex_cnab.git
$ cd ex_cnab
$ mix deps.get
$ mix testOnce you've made your additions and `mix test` passes, go ahead and open a PR!
## License
ExCnab is Copyright © 2023 João Pedro Alves. It is free software, and may be
redistributed under the terms specified in the [LICENSE](/LICENSE) file.