A command line tool for calculating fees and VAT from CRDB account statements in Excel format
Project description
CRDB Fee Calculator
A command line tool for calculating fees and VAT from CRDB account statements in Excel format.
Features
- ๐ Simple command line interface
- ๐ Automatic detection of fees/charges
- ๐๏ธ VAT calculation
- ๐ฑ Automatic currency detection (USD/TZS)
- ๐ฐ Support for different currencies
- ๐จ Beautiful, formatted output
- ๐ Supports .xlsx and .xls files
Installation
From PyPI (Recommended)
pip install crdb-fee-calculator
From Source
Requirements
- Linux system (Ubuntu 22.04+ recommended)
- Python 3.7 or higher
- python3-venv (will be installed automatically)
Quick Installation
- Clone or download repository
- Make installation script executable:
chmod +x install.sh
- Run installation:
./install.sh
The tool will be automatically installed in /usr/local/bin and will be available from anywhere.
Note: This installation method is for development/testing. For production use, install from PyPI.
Manual Installation
-
Create virtual environment:
python3 -m venv venv source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Make script executable and copy to PATH:
chmod +x crdbfee.py sudo cp crdbfee.py /usr/local/bin/crdbfee
Note: The automated installation script is recommended as it handles virtual environment setup automatically.
Usage
Basic Usage
crdbfee statement.xlsx
Show Help
crdbfee --help
Show Version
crdbfee --version
Example Output
USD Output
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CRDB Fee Calculator โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ ๐ Fees/Charges: 125.50 USD โ
โ ๐๏ธ VAT Total: 25.10 USD โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ ๐ฐ Total Amount: 150.60 USD โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฑ Detected currency: USD
TZS Output
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CRDB Fee Calculator โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ ๐ Fees/Charges: 25000.00 TZS โ
โ ๐๏ธ VAT Total: 5000.00 TZS โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ ๐ฐ Total Amount: 30000.00 TZS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฑ Detected currency: TZS
Uninstallation
chmod +x uninstall.sh
./uninstall.sh
Supported File Formats
- Excel (.xlsx)
- Excel (.xls)
Detection of Fees and VAT
The tool automatically detects:
Fees/Charges:
- charge
- commission
- fee
- levy
- fund transfer
VAT:
- All entries with "vat" in the description text
Currency Detection
The tool automatically detects the currency from:
- Column names (e.g., "Balance USD", "Amount TZS")
- Description texts (e.g., "Bank Fee USD", "Commission TZS")
- Currency symbols ($, TSH, TZS)
- Fallback: USD (default)
Supported Currencies:
- USD: US Dollar
- TZS: Tanzania Shilling
Troubleshooting
"File does not exist"
- Check the file path
- Make sure the file is in the current directory
"Not an Excel file"
- Use only .xlsx or .xls files
- Make sure the file is not corrupted
"Python not found"
- Install Python 3.7 or higher
- Make sure
python3is available in PATH
"externally-managed-environment" Error (Ubuntu 22.04+)
- This error occurs because Ubuntu prevents system-wide pip installations
- The installation script automatically creates a virtual environment to solve this
- If you encounter this error, use the provided
install.shscript instead of manual pip installation
License
See LICENSE file for details.
Support
For problems or questions, please create an issue in the repository.
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 crdb_fee_calculator-1.0.1.tar.gz.
File metadata
- Download URL: crdb_fee_calculator-1.0.1.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5033a587be8270b9c145eb2ff35ba4973fe52df10cab201e55612c69be2ce3b
|
|
| MD5 |
7ee2dc4459cf15a2886069d1b2074d1f
|
|
| BLAKE2b-256 |
8db37d00318700c83ae2c1e16f7ebb3d8350c6f53163ee11042472753f3acfb3
|
File details
Details for the file crdb_fee_calculator-1.0.1-py3-none-any.whl.
File metadata
- Download URL: crdb_fee_calculator-1.0.1-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
513c8d6aa8b7a02046e622de39c50468b5e74729effbf0698bde1e03a0a5d554
|
|
| MD5 |
69879373d64b3e763b2609265217fb7b
|
|
| BLAKE2b-256 |
ab51af2fc301a640342f818c616d402f544c43999c1b89ea721f25bb2d5de076
|