update readme
This commit is contained in:
parent
14734d3125
commit
fa155b0e3a
1 changed files with 16 additions and 17 deletions
33
README.md
33
README.md
|
|
@ -1,6 +1,6 @@
|
||||||
# BAC Statement Extractor
|
# 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
|
## Dependencies
|
||||||
|
|
||||||
|
|
@ -10,13 +10,9 @@ Extracts credit card transactions from BAC Costa Rica statement PDFs. Parses sec
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python bac_extract.py <pdf_file> <card_suffix> [options]
|
python bac_extract.py <pdf_file> [options]
|
||||||
```
|
```
|
||||||
|
|
||||||
**Arguments:**
|
|
||||||
- `pdf_file`: Path to the BAC statement PDF
|
|
||||||
- `card_suffix`: Last 4 digits of the card to filter
|
|
||||||
|
|
||||||
**Options:**
|
**Options:**
|
||||||
- `-o, --output`: Output JSON path (default: transactions.json)
|
- `-o, --output`: Output JSON path (default: transactions.json)
|
||||||
- `--pretty`: Pretty-print JSON output
|
- `--pretty`: Pretty-print JSON output
|
||||||
|
|
@ -24,8 +20,8 @@ python bac_extract.py <pdf_file> <card_suffix> [options]
|
||||||
|
|
||||||
**Examples:**
|
**Examples:**
|
||||||
```bash
|
```bash
|
||||||
python bac_extract.py statement.pdf 1234 --pretty
|
python bac_extract.py statement.pdf --pretty
|
||||||
python bac_extract.py statement.pdf 1234 -o output.json -v
|
python bac_extract.py statement.pdf -o output.json -v
|
||||||
```
|
```
|
||||||
|
|
||||||
## Output Format
|
## Output Format
|
||||||
|
|
@ -36,14 +32,15 @@ python bac_extract.py statement.pdf 1234 -o output.json -v
|
||||||
"source_file": "statement.pdf",
|
"source_file": "statement.pdf",
|
||||||
"extraction_date": "2025-01-15T12:00:00Z",
|
"extraction_date": "2025-01-15T12:00:00Z",
|
||||||
"statement_date": "2025-01-10",
|
"statement_date": "2025-01-10",
|
||||||
"card_filter": "1234",
|
|
||||||
"total_transactions": 5
|
"total_transactions": 5
|
||||||
},
|
},
|
||||||
"card_holder": {
|
"card_holders": [
|
||||||
"card_suffix": "1234",
|
{
|
||||||
"name": "CARD HOLDER NAME"
|
"card_suffix": "1234",
|
||||||
},
|
"name": "CARD HOLDER NAME"
|
||||||
"transactions": [
|
}
|
||||||
|
],
|
||||||
|
"purchases": [
|
||||||
{
|
{
|
||||||
"reference": "123456789012",
|
"reference": "123456789012",
|
||||||
"date": "2025-01-09",
|
"date": "2025-01-09",
|
||||||
|
|
@ -54,10 +51,12 @@ python bac_extract.py statement.pdf 1234 -o output.json -v
|
||||||
"amount_usd": null
|
"amount_usd": null
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"other_charges": [],
|
||||||
|
"voluntary_services": [],
|
||||||
"summary": {
|
"summary": {
|
||||||
"total_crc": 50000.00,
|
"purchases": { "total_crc": 50000.00, "total_usd": 0.00, "count": 5 },
|
||||||
"total_usd": 0.00,
|
"other_charges": { "total_crc": 0.00, "total_usd": 0.00, "count": 0 },
|
||||||
"transaction_count": 5
|
"voluntary_services": { "total_crc": 0.00, "total_usd": 0.00, "count": 0 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue