Skip to content

iulian3144/wallet_manager

Repository files navigation

Wallet Manager

This script allows you to generate useful reports out of a CSV file storing transaction details in the following format:

Date,Account,Category,Note,Amount,Debit
Date: formatted as `YYYYMMDD`
Category: any string
Account: any string
Note: any string
Amount: a valid floating point number
Debit: 0 or 1; 0 if it's an expense, 1 if it's an income.

For help on how to run the script, you can execute ./main.py -h

Import data from a SQLite 3.x database

CSV files can be imported from a SQLite 3.x database (backed up by My Wallet). using the import_script.sql SQL script and the following commands.

$ sqlite3 <dbfile>
sqlite> .mode csv
sqlite> output csv_file_path
sqlite> .read import_script_path

Colored output using termcolor

Because termcolor does not verify if stdout is a tty, it is recommended to apply the termcolor.patch if you want to, for example, redirect the output to a file. Otherwise, the escape character (ANSI color codes) will also be present in the output file (generally, this is not desired). The patch simply adds a check (sys.stdout.isatty()) to see if the stdout is a tty.

About

Generate useful transaction reports from a CSV file.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages