Skip to main content

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:

  1. Removes metadata: Card number, available balance, arranged balance, and blank lines
  2. 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)
  3. Removes totals: Total credit/debit sections and pending transactions
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bankinter_converter-0.1.0.tar.gz (48.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bankinter_converter-0.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

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

Hashes for bankinter_converter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4648138d62995100bf33297d4d82a2ae0054895427483434c3c47a6502f386e1
MD5 96ca3b132e40ffefc9831ab58d095b37
BLAKE2b-256 dcd6a2e822ab7d741957b55b7e12fa8c1f2d82c0e56c35db8c65eaa3bd07bdfb

See more details on using hashes here.

Provenance

The following attestation bundles were made for bankinter_converter-0.1.0.tar.gz:

Publisher: release.yml on barbarity/bankinter-converter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bankinter_converter-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bankinter_converter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22ff670402b229d1b3a1794bc725e23fd0cf851b4119beca891e62e31fb3362d
MD5 ed41b7c6144f57e6c1c71e5d1e2845d7
BLAKE2b-256 df60d575886ae7f9861d054532f865cbb45997f11287fa7da919137d8134f87c

See more details on using hashes here.

Provenance

The following attestation bundles were made for bankinter_converter-0.1.0-py3-none-any.whl:

Publisher: release.yml on barbarity/bankinter-converter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page