Skip to content

🇧🇷 🏦 📋 Brazilian banks: MergeTool - The C# .NET tool used to merge and keep data from the Bancos Brasileiros repository updated

License

Notifications You must be signed in to change notification settings

guibranco/BancosBrasileiros-MergeTool

Repository files navigation

Bancos Brasileiros - Merge Tool

Bancos Brasileiros logo

🇧🇷 🏦 📋 A tool for generating and updating data in the Bancos Brasileiros repository

Build status GitHub last commit GitHub license time tracker


📋 About

The BancosBrasileiros-MergeTool is a utility designed to gather, process, and consolidate Brazilian banking institution data from multiple official sources. This tool ensures that the Bancos Brasileiros repository contains the most up-to-date and accurate information about financial institutions in Brazil.

🔄 Data Sources

The tool currently collects and merges data from the following sources:

Source Description Data Type
Bancos.json Source of truth - base JSON with trusted data JSON
STR Sistema de Transferência de Reservas CSV
SPI/PIX Sistema de Pagamentos Instantâneos CSV
SLC Serviço de Liquidação Cartões PDF
SILOC Sistema de Liquidação Diferida das Transferências Interbancárias de Ordens de Crédito PDF
SITRAF Sistema de Transferência de Fundos PDF
CTC Central de Transferência de Crédito PDF
PCPS Plataforma Centralizada de Portabilidade de Salário PDF
PCR Plataforma Centralizada de Recebíveis PDF
Cheque Legal Cheque Legal PDF
Detecta Flow Detecta Flow PDF

💻 Technology

  • Language: C# (.NET 9.0)
  • Features: PDF data extraction, data merging, output in multiple formats

🚀 Getting Started

Prerequisites

  • .NET 9.0 SDK or later
  • Your preferred IDE (Visual Studio, VS Code, Rider, etc.)

Running Locally

  1. Clone the repository:

    git clone https://github.com/guibranco/BancosBrasileiros-MergeTool.git
  2. Navigate to the project directory:

    cd BancosBrasileiros-MergeTool
  3. Build and run the project:

    dotnet build
    dotnet run

Output files will be generated in the result directory.

🤝 Contributing

We welcome contributions to improve the MergeTool! Here's how to add a new data source:

Step-by-Step Guide

  1. Fork and Clone the repository:

    git clone https://github.com/YourUsername/BancosBrasileiros-MergeTool.git
  2. Open the project in your preferred IDE.

  3. Add Required Information:

    • Add URLs to Constants.cs
    • Add a new enum item in Source.cs (use system acronyms when possible)
  4. Implement Data Reader:

    • Create a new method in Reader.cs named Load[NewSystemAcronym]
    • For PDF sources, follow the existing patterns for extraction
    • For other formats, implement appropriate extraction logic
    • If using RegExp, add patterns to Patterns.cs
  5. Update Data Model:

    • Add new fields to the Bank.cs file
  6. Implement Data Merging:

    • Create a method in Seeder.cs named Merge[NewSystemAcronym]
    • Filter data by ISPB and Document to find existing entries
    • Only add new banks if they have COMPE, ISPB, Document, and Name (minimum required fields)
  7. Update Program Flow:

    • Call your new methods in the AcquireData method in Program.cs
  8. Update Output Writers:

    • Edit the following methods in Writer.cs to include your new fields:
      • SaveCsv
      • SaveMarkdown
      • SaveSql
  9. Test Your Changes:

    • Run the application locally to verify it works correctly
    • Check the generated files in the result directory
  10. Submit a Pull Request:

    • Commit your changes
    • Push to your fork
    • Create a PR with a detailed description of your changes

Important Notes

  • Testing: You can run the application locally as many times as needed without affecting the repository
  • New Banks: If adding new bank entries, please mention this in your PR comment
  • Mandatory Fields: Ensure all new bank entries have COMPE, ISPB, Document, and Name at minimum

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgements

  • Thanks to all contributors who have helped improve this tool
  • Thanks to the Brazilian financial institutions for providing the data sources

About

🇧🇷 🏦 📋 Brazilian banks: MergeTool - The C# .NET tool used to merge and keep data from the Bancos Brasileiros repository updated

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published