remove card suffix functionality

This commit is contained in:
Fabian Montero 2026-03-09 13:59:03 -06:00
parent 62450842c3
commit a05f701f16
Signed by: fabian
GPG key ID: 8036F30EDBAC8447
2 changed files with 39 additions and 94 deletions

View file

@ -13,11 +13,11 @@ Single-script Python tool that extracts credit card transactions from BAC Costa
## Usage
```bash
python bac_extract.py <pdf_file> <card_suffix> [options]
python bac_extract.py <pdf_file> [options]
# Examples
python bac_extract.py EstadodeCuenta.pdf 1234 --pretty
python bac_extract.py statement.pdf 1234 -o output.json -v
python bac_extract.py EstadodeCuenta.pdf --pretty
python bac_extract.py statement.pdf -o output.json -v
```
Options:
@ -31,8 +31,7 @@ The extraction pipeline:
1. Validates PDF is a BAC statement (`is_bac_statement`)
2. Locates section B via regex patterns (`find_section_b_start`, `is_section_end`)
3. Extracts tables page-by-page using pdfplumber
4. Filters transactions by card suffix (last 4 digits)
5. Parses Spanish dates (D-MMM-YY format) and amounts with comma separators
4. Parses Spanish dates (D-MMM-YY format) and amounts with comma separators
Key parsing functions:
- `parse_spanish_date`: Converts "15-ENE-25" to "2025-01-15"