A command-line tool for converting bank statements from Excel to CSV format with support for several Chilean banks.
Project description
Transactions Chile
A command-line tool for converting bank statements from Excel to CSV format with support for several Chilean banks.
Features
- Convert bank statements from Excel (.xlsx, .xls) files to CSV format
- Support for multiple banks:
- Santander (Checking Account)
- Itau (Credit Card and Checking Account)
- Banco Chile (Credit Card and Checking Account)
- Account type selection (checking or credit card)
- Validation of transaction data
- Customize delimiter and encoding
- Rich command-line interface with progress indicators
- Force overwrite option
Installation
From PyPI
pip install transactions-chile
From Source
Clone the repository and install in development mode:
git clone https://github.com/yourusername/transactions-chile.git
cd transactions-chile
pip install -e .
Usage
Once installed, you can use the tool in the following ways:
Convert bank statements
Convert a bank statement from Excel to CSV:
transactions-chile convert path/to/your/bank-statement.xlsx --bank santander
List supported banks
View all supported banks:
transactions-chile supported-banks
Command Line Options
Usage: transactions-chile convert [OPTIONS] INPUT_FILE
Convert an Excel file to CSV format using specific bank transaction processors.
INPUT_FILE: Path to the Excel file to convert.
Options:
-o, --output-file PATH Output CSV file path. If not specified, will use
the input filename with .csv extension.
-s, --sheet-name TEXT Sheet name or index (0-based) to convert.
Defaults to first sheet.
-d, --delimiter TEXT Delimiter to use in the CSV file. Defaults to
comma.
-e, --encoding TEXT Encoding for the output CSV file. Defaults to
utf-8.
-f, --force Overwrite output file if it already exists.
-b, --bank [santander|itau|bancochile]
Bank type (required)
-a, --account-type [checking|credit]
Account type (checking for 'Cuenta Corriente',
credit for 'Tarjeta de Crédito'). If not specified,
defaults to the most common type for the selected bank.
--validate / --no-validate Validate output against schema before saving
(default: validate)
--help Show this message and exit.
Examples
Convert a Santander bank statement:
transactions-chile convert santander.xlsx --bank santander
Convert a Banco Chile credit card statement (default account type):
transactions-chile convert bancochile.xls --bank bancochile
Convert a Banco Chile checking account statement:
transactions-chile convert bancochile-cc.xls --bank bancochile --account-type checking
Convert an Itau credit card statement with a specific output file:
transactions-chile convert itau.xls --bank itau --output-file itau-processed.csv
Convert a Banco Chile statement with a specific sheet:
transactions-chile convert bancochile.xlsx --bank bancochile --sheet-name "Movimientos"
Use a different delimiter:
transactions-chile convert santander.xlsx --bank santander --delimiter ";" --output-file santander_semicolon.csv
Force overwrite of existing file:
transactions-chile convert itau.xlsx --bank itau -f
Skip validation:
transactions-chile convert bancochile.xlsx --bank bancochile --no-validate
Development
Setting up development environment
- Clone the repository
- Create and activate a virtual environment
- Install development dependencies:
pip install -e ".[dev]"
Running tests
pytest
Building the package
python -m build
License
MIT
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
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 transactions_chile-0.3.2.tar.gz.
File metadata
- Download URL: transactions_chile-0.3.2.tar.gz
- Upload date:
- Size: 86.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 |
132102b48366fd4ce559daa81c62ce1089642e086fe4969c9b7215b9e64ef857
|
|
| MD5 |
88833158384c0b13163d3a5b26935549
|
|
| BLAKE2b-256 |
abaa010ccaccc1ae234ec0e822ee2acbced7fcfe406986ac128c4bc82ec642f7
|
Provenance
The following attestation bundles were made for transactions_chile-0.3.2.tar.gz:
Publisher:
python-package.yml on josecannete/transactions-chile
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
transactions_chile-0.3.2.tar.gz -
Subject digest:
132102b48366fd4ce559daa81c62ce1089642e086fe4969c9b7215b9e64ef857 - Sigstore transparency entry: 198158054
- Sigstore integration time:
-
Permalink:
josecannete/transactions-chile@5b0d348ba3fcea29a6966a4801f8bed470607bfa -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/josecannete
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-package.yml@5b0d348ba3fcea29a6966a4801f8bed470607bfa -
Trigger Event:
push
-
Statement type:
File details
Details for the file transactions_chile-0.3.2-py3-none-any.whl.
File metadata
- Download URL: transactions_chile-0.3.2-py3-none-any.whl
- Upload date:
- Size: 8.7 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 |
34809f8c24b1cb011dd1657779c03192cd5dc516d9a026e8dc2eb40d098ab6bc
|
|
| MD5 |
b71d082fab7d2cf101d3903fa2765d73
|
|
| BLAKE2b-256 |
4ee4c0e213cc0e01d5207dfe63bfb9bf085bda94c6702aa74bcf7302351f25d1
|
Provenance
The following attestation bundles were made for transactions_chile-0.3.2-py3-none-any.whl:
Publisher:
python-package.yml on josecannete/transactions-chile
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
transactions_chile-0.3.2-py3-none-any.whl -
Subject digest:
34809f8c24b1cb011dd1657779c03192cd5dc516d9a026e8dc2eb40d098ab6bc - Sigstore transparency entry: 198158062
- Sigstore integration time:
-
Permalink:
josecannete/transactions-chile@5b0d348ba3fcea29a6966a4801f8bed470607bfa -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/josecannete
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-package.yml@5b0d348ba3fcea29a6966a4801f8bed470607bfa -
Trigger Event:
push
-
Statement type: