Skip to main content

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

  1. Clone or download repository
  2. Make installation script executable:
    chmod +x install.sh
    
  3. 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

  1. Create virtual environment:

    python3 -m venv venv
    source venv/bin/activate
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. 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 python3 is 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.sh script 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


Download files

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

Source Distribution

crdb_fee_calculator-1.0.1.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

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

crdb_fee_calculator-1.0.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

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

Hashes for crdb_fee_calculator-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e5033a587be8270b9c145eb2ff35ba4973fe52df10cab201e55612c69be2ce3b
MD5 7ee2dc4459cf15a2886069d1b2074d1f
BLAKE2b-256 8db37d00318700c83ae2c1e16f7ebb3d8350c6f53163ee11042472753f3acfb3

See more details on using hashes here.

File details

Details for the file crdb_fee_calculator-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for crdb_fee_calculator-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 513c8d6aa8b7a02046e622de39c50468b5e74729effbf0698bde1e03a0a5d554
MD5 69879373d64b3e763b2609265217fb7b
BLAKE2b-256 ab51af2fc301a640342f818c616d402f544c43999c1b89ea721f25bb2d5de076

See more details on using hashes here.

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