update readme
This commit is contained in:
parent
14734d3125
commit
fa155b0e3a
1 changed files with 16 additions and 17 deletions
29
README.md
29
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 <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:**
|
||||
- `-o, --output`: Output JSON path (default: transactions.json)
|
||||
- `--pretty`: Pretty-print JSON output
|
||||
|
|
@ -24,8 +20,8 @@ python bac_extract.py <pdf_file> <card_suffix> [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_holders": [
|
||||
{
|
||||
"card_suffix": "1234",
|
||||
"name": "CARD HOLDER NAME"
|
||||
},
|
||||
"transactions": [
|
||||
}
|
||||
],
|
||||
"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 }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue