A CLI tool to convert Bankinter bank statements (checking accounts and credit cards) from Excel to CSV
Project description
Bankinter Converter
A CLI tool to convert Bankinter bank statements (checking accounts and credit cards) from Excel to CSV format.
Features
- Checking Account Conversion: Convert checking account statements by removing specified rows and selecting columns
- Credit Card Conversion: Convert credit card statements with automatic column detection and clean output
- Language Agnostic: Works with statements in different languages
- Flexible Column Selection: Automatically detects transaction structure
Installation
Using uvx (Recommended)
# Install and run directly
uvx bankinter-converter --help
# Or install globally
uvx install bankinter-converter
Using uv
# Install globally as a tool
uv tool install bankinter-converter
# Or install in development mode
uv sync
Alternative: Using pip
pip install bankinter-converter
Usage
Checking Account Conversion
bankinter-converter checking input.xls output.csv
Options:
--skip-rows N: Number of rows to skip at the beginning (default: 3)--columns A-E: Columns to include (default: A-E)--sheet SHEET: Sheet name or index (default: 0)--verbose: Show detailed processing information
Example:
bankinter-converter checking statement.xls transactions.csv --skip-rows 5 --columns A-D
Credit Card Conversion
bankinter-converter credit input.xls output.csv
Options:
--verbose: Show detailed processing information
Example:
bankinter-converter credit credit_statement.xls credit_transactions.csv
Credit Card Converter Logic
The credit card converter automatically:
- Removes metadata: Card number, available balance, arranged balance, and blank lines
- Detects transaction structure:
- If Column D contains transaction types → Output: Date, Description, Type, Amount (A-D)
- If Column D is empty → Output: Date, Description, Amount (A-C)
- Removes totals: Total credit/debit sections and pending transactions
- Outputs clean CSV: Only transaction data with proper headers
The detection is language-agnostic and relies on data content rather than header names.
Development
Setup with uv (Recommended)
# Clone the repository
git clone https://github.com/barbarity/bankinter-converter.git
cd bankinter-converter
# Create virtual environment and install dependencies (uses Python 3.13)
uv sync --extra dev
Alternative Setup with pip
# Clone the repository
git clone https://github.com/barbarity/bankinter-converter.git
cd bankinter-converter
# Create virtual environment (Python 3.8+ required)
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -e ".[dev]"
Running Tests
# With uv
uv run pytest
# With pip (after activating virtual environment)
pytest
Code Quality
# Check code with ruff
uv run ruff check .
# Format code with ruff
uv run ruff format .
# Fix issues automatically
uv run ruff check --fix .
Testing the Tool
# With uv
uv run bankinter-converter --help
# With pip (after activating virtual environment)
bankinter-converter --help
Project Structure
bankinter-converter/
├── src/
│ └── bankinter_converter/
│ ├── __init__.py
│ ├── cli.py # Command-line interface
│ ├── checking_account.py # Checking account conversion logic
│ └── credit_card.py # Credit card conversion logic
├── tests/
│ ├── test_checking_account.py
│ └── test_credit_card.py
├── pyproject.toml # Project configuration
├── README.md # This file
├── LICENSE # MIT License
└── .gitignore
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bankinter_converter-0.1.0.tar.gz.
File metadata
- Download URL: bankinter_converter-0.1.0.tar.gz
- Upload date:
- Size: 48.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4648138d62995100bf33297d4d82a2ae0054895427483434c3c47a6502f386e1
|
|
| MD5 |
96ca3b132e40ffefc9831ab58d095b37
|
|
| BLAKE2b-256 |
dcd6a2e822ab7d741957b55b7e12fa8c1f2d82c0e56c35db8c65eaa3bd07bdfb
|
Provenance
The following attestation bundles were made for bankinter_converter-0.1.0.tar.gz:
Publisher:
release.yml on barbarity/bankinter-converter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bankinter_converter-0.1.0.tar.gz -
Subject digest:
4648138d62995100bf33297d4d82a2ae0054895427483434c3c47a6502f386e1 - Sigstore transparency entry: 388947469
- Sigstore integration time:
-
Permalink:
barbarity/bankinter-converter@ec54d3ea3068fdb37117afb97eba48497de8d3fe -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/barbarity
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ec54d3ea3068fdb37117afb97eba48497de8d3fe -
Trigger Event:
push
-
Statement type:
File details
Details for the file bankinter_converter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bankinter_converter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22ff670402b229d1b3a1794bc725e23fd0cf851b4119beca891e62e31fb3362d
|
|
| MD5 |
ed41b7c6144f57e6c1c71e5d1e2845d7
|
|
| BLAKE2b-256 |
df60d575886ae7f9861d054532f865cbb45997f11287fa7da919137d8134f87c
|
Provenance
The following attestation bundles were made for bankinter_converter-0.1.0-py3-none-any.whl:
Publisher:
release.yml on barbarity/bankinter-converter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bankinter_converter-0.1.0-py3-none-any.whl -
Subject digest:
22ff670402b229d1b3a1794bc725e23fd0cf851b4119beca891e62e31fb3362d - Sigstore transparency entry: 388947501
- Sigstore integration time:
-
Permalink:
barbarity/bankinter-converter@ec54d3ea3068fdb37117afb97eba48497de8d3fe -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/barbarity
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ec54d3ea3068fdb37117afb97eba48497de8d3fe -
Trigger Event:
push
-
Statement type: