Bancos Brasileiros - Merge Tool
🇧🇷 🏦 📋 The Merge Tool generates and updates data in the Bancos Brasileiros repository.
Contributing
Here is a step-by-step on how to add a new source of data to the merge tool:
- Check out MergeTool.
- Open VS, VS Code, Rider, or your favorite IDE / Code Editor for .NET projects.
- Load the project (currently, it is in C# .NET 8.0).
- Add the required URLs to the
Constants.cs
file. - Add a new enum item in the
Source.cs
file. Please use the source system acronyms whenever possible. - Add a new method in the
Reader.cs
called Load[NewSystemAcronym]. This should do all the heavy job of grabbing the information from the remote source. - If the new source provides a PDF file, follow the other method patterns to extract the PDF information from the file.
- Implements the data extraction the way you prefer if it is not a PDF file.
- If you need to use RegExp to extract data, add it to the
Patterns.cs
file. - Add the new field(s) to the
Bank.cs
file. - In the
Seeder.cs
file, implement the method Merge[NewSystemAcronym] to merge the new data with the existing ones. I prefer to filter the data by ISPB and then Document to check for existing data. Rely on the existing list. DO NOT ADD new bank to the list if it is not present with COMPE, ISPB, Document, and Name at least. These are mandatory fields, if you have all this information, and you did not find the bank on the existing list, feel free to add it to the list. (Let me know this in the PR comment). - Call the new methods (Load[NewSystemAcronym]r and Merge[NewSystemAcronym]) in the
AcquireData
method inside theProgram.cs
file. - On the
Writer.cs
file, edit the following methods, mapping the new field(s):SaveCsv
SaveMarkdown
SaveSql
- Test it 🧪
- Commit and submit a PR 🎉
Testing
- You can run the application locally without submitting any changes to this repository.
- Run how many times you need, it will only generate some files in the output directory inside result directory.
Sources
Currently, this tool uses some sources to generate data. The complete list of sources can be found at Constants.cs
- Bancos.json - Source of truth - the base JSON file with trusted data. Any manual change should be done in this file.
- STR - The STR (Sistema de Transferência de Reservas).
- SPI - The SPI/PIX (Sistema de Pagamentos Instantâneos) PSP (Participantes do Sistema de Pagamentos), always with the current date.
- SLC - The SLC (Serviço de Liquidação Cartões).
- SILOC - The SILOC (Sistema de Liquidação Diferida das Transferências Interbancárias de Ordens de Crédito).
- SITRAF - The SITRAF (Sistema de Transferência de Fundos).
- CTC - The CTC (Central de Transferência de Crédito).
- PCPS - The PCPS (Plataforma Centralizada de Portabilidade de Salário).
- PCR - The PCR (Plataforma Centralizada de Recebíveis).
- Cheque Legal - The Cheque Legal.
- Detecta Flow - The Detecta Flow.