Code Monkey home page Code Monkey logo

ex_cnab's Introduction

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.

Installation

To install in all environments (useful for generating seed data in dev/prod):

In mix.exs, add the ExMachina dependency:

def deps do
  [
    {:ex_cnab, "~> 1.3.6"},
  ]
end

Overview

Check out the docs for more details.

Read and Build info from file:

defmodule MyApp.CnabParser do
  import ExCnab240

  def run(filepath), do: decode(filepath, %{})
end

output:

    {:ok, %{
        header: %{
          # Content
        },
        details: %{
          # Content
        },
        footer: %{
          # Content
        },
        additional_info: %{
          # Content
        }
      }}
defmodule MyApp.CnabParser do
  import ExCnab240

  def run(decoded_cnab), do: encode(decoded_cnab, %{})
end

output:

    {:ok, %{content: "xxxx...", filename: "JHVAABBDD.ret"}}
defmodule MyApp.GetDetailsType do
  import ExCnab240

  def 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 test

Once 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 file.

ex_cnab's People

Contributors

ali1ariel avatar eulixir avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

lucianofa

ex_cnab's Issues

Link - Page Not Found

Hi @joaopealves, interesting project.

I noticed that the link in that section below is Not Found.

Having this result:

image

I believe it's just updating it to what is suggested :D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.