@banksheet/core
v0.1.0
Published
Bank statement parsing engine
Maintainers
Readme
@banksheet/core
Bank statement parsing engine — converts credit card PDF statements into structured data (CSV, Excel, JSON).
Supported Banks
| Bank | Country | Type | |------|---------|------| | Bradesco | BR | Credit Card | | C6 Bank | BR | Credit Card | | Inter | BR | Credit Card | | Itaú | BR | Credit Card | | Nubank | BR | Credit Card |
Usage
import { detectParser, parseStatement, exportToCsv } from '@banksheet/core';
import { readFileSync } from 'fs';
const pdf = readFileSync('statement.pdf');
const parser = await detectParser(pdf);
if (parser) {
const transactions = await parseStatement(pdf, parser);
const csv = exportToCsv(transactions);
console.log(csv);
}API
detectParser(buffer)— auto-detect which bank parser matches the PDFparseStatement(buffer, parser)— extract transactions from a PDFexportToCsv(transactions)— export to CSV stringexportToExcel(transactions)— export to Excel bufferexportToJson(transactions)— export to JSON string
Adding Parsers
See the Plugin Development Guide.
License
MIT
