From fa155b0e3a9dd7c4b5c04eafb43475a0aa91b437 Mon Sep 17 00:00:00 2001 From: Fabian Montero Date: Mon, 9 Mar 2026 15:41:15 -0600 Subject: [PATCH] update readme --- README.md | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index d4af911..a56332a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # BAC Statement Extractor -Extracts credit card transactions from BAC Costa Rica statement PDFs. Parses section "B) Detalle de compras del periodo" and outputs JSON. +Extracts credit card transactions from BAC Costa Rica statement PDFs. Parses sections B (purchases), D (other charges), and E (voluntary services) and outputs JSON. ## Dependencies @@ -10,13 +10,9 @@ Extracts credit card transactions from BAC Costa Rica statement PDFs. Parses sec ## Usage ```bash -python bac_extract.py [options] +python bac_extract.py [options] ``` -**Arguments:** -- `pdf_file`: Path to the BAC statement PDF -- `card_suffix`: Last 4 digits of the card to filter - **Options:** - `-o, --output`: Output JSON path (default: transactions.json) - `--pretty`: Pretty-print JSON output @@ -24,8 +20,8 @@ python bac_extract.py [options] **Examples:** ```bash -python bac_extract.py statement.pdf 1234 --pretty -python bac_extract.py statement.pdf 1234 -o output.json -v +python bac_extract.py statement.pdf --pretty +python bac_extract.py statement.pdf -o output.json -v ``` ## Output Format @@ -36,14 +32,15 @@ python bac_extract.py statement.pdf 1234 -o output.json -v "source_file": "statement.pdf", "extraction_date": "2025-01-15T12:00:00Z", "statement_date": "2025-01-10", - "card_filter": "1234", "total_transactions": 5 }, - "card_holder": { - "card_suffix": "1234", - "name": "CARD HOLDER NAME" - }, - "transactions": [ + "card_holders": [ + { + "card_suffix": "1234", + "name": "CARD HOLDER NAME" + } + ], + "purchases": [ { "reference": "123456789012", "date": "2025-01-09", @@ -54,10 +51,12 @@ python bac_extract.py statement.pdf 1234 -o output.json -v "amount_usd": null } ], + "other_charges": [], + "voluntary_services": [], "summary": { - "total_crc": 50000.00, - "total_usd": 0.00, - "transaction_count": 5 + "purchases": { "total_crc": 50000.00, "total_usd": 0.00, "count": 5 }, + "other_charges": { "total_crc": 0.00, "total_usd": 0.00, "count": 0 }, + "voluntary_services": { "total_crc": 0.00, "total_usd": 0.00, "count": 0 } } } ```