CodaParser 1.0.2

dotnet add package CodaParser --version 1.0.2                
NuGet\Install-Package CodaParser -Version 1.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CodaParser" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CodaParser --version 1.0.2                
#r "nuget: CodaParser, 1.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CodaParser as a Cake Addin
#addin nuget:?package=CodaParser&version=1.0.2

// Install CodaParser as a Cake Tool
#tool nuget:?package=CodaParser&version=1.0.2                

CodaParser

NuGet License .NET

CodaParser is a modern C# .NET library for parsing Belgian CODA banking files. It is a fork of supervos/coda-parser by Christophe Devos, bringing enhanced functionality and updated dependencies to the .NET ecosystem.

Table of Contents

Features

  • .NET Standard 2.0: Compatible with both .NET Framework and .NET Core.
  • Modern C# Features: Utilizes the latest C# language enhancements for improved performance and readability.
  • Updated Dependencies: Leveraging the latest NuGet packages for better stability and security.
  • Easy Integration: Simple API for parsing CODA files.
  • Extensible: Easily extendable to support additional features or custom processing.
  • Reliable: Based on the well-established supervos/coda-parser project, ensuring accuracy and reliability.

Installation

CodaParser will be available as a NuGet package soon. In the meantime, you can download the source code and build it yourself.

NuGet Package

Install-Package CodaParser

Building from Source

If you prefer to build the library yourself, follow these steps:

  1. Clone the Repository

    git clone https://github.com/phmatray/coda-parser.git
    cd CodaParser
    
  2. Restore Dependencies

    Ensure you have the .NET SDK installed. Then run:

    dotnet restore
    
  3. Build the Project

    dotnet build
    
  4. Use the Library

    Reference the built DLLs in your project.

Usage

Using CodaParser is straightforward. Below is a simple example demonstrating how to parse a CODA file and iterate through the statements and transactions.

using CodaParser;
using System.Collections.Generic;

// Instantiate the parser (assuming a concrete implementation is available)
IParser<Statement> parser = new Parser();

// Parse the CODA file
IEnumerable<Statement> statements = parser.ParseFile("path/to/coda-file.cod");

// Iterate through the statements and transactions
foreach (var statement in statements)
{
    Console.WriteLine($"Date: {statement.Date:yyyy-MM-dd}");
    
    foreach (var transaction in statement.Transactions)
    {
        Console.WriteLine($"{transaction.Account.Name}: {transaction.Amount}");
    }
    
    Console.WriteLine($"New Balance: {statement.NewBalance}");
    Console.WriteLine(new string('-', 40));
}

API Reference

Parser Class

Provides methods to parse CODA files into structured statements.

  • Methods
    • IEnumerable<Statement> Parse(IEnumerable<string> codaLines): Parses a collection of CODA lines.
    • IEnumerable<Statement> ParseFile(string codaFile): Parses a CODA file from the specified path.

Statement Class

Represents a single banking statement extracted from a CODA file.

  • Properties
    • Date: The execution date of the statement.
    • Account: The changed account.
    • InitialBalance: The initial balance of the account.
    • NewBalance: The new balance of the account.
    • InformationalMessage: An informational message.
    • Transactions: The executed transactions.

For a complete API reference, please refer to the documentation.

Contributing

Contributions are welcome! We follow the Conventional Commits guidelines to ensure a consistent commit history.

  1. Fork the Repository

  2. Create a Feature Branch

    git checkout -b feature/YourFeature
    
  3. Commit Your Changes

    Use conventional commit messages. For example:

    feat(parser): add support for new transaction types
    
  4. Push to the Branch

    git push origin feature/YourFeature
    
  5. Open a Pull Request

Please ensure your code follows the project's coding standards and includes appropriate tests.

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE Version 2.

Acknowledgements


Happy Parsing!

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 98 9/20/2024
1.0.1 97 9/20/2024
1.0.0 92 9/20/2024