Create an HTML report of your expenses from a set of expenses/income stored in a CSV file. The expected structure is the default export of the app [Money Manager
]. Although the app is good at tracking expenses as it can be done quickly at any time, I don't like the data visualization or is not helpful enough.
This project aims to create some graphs from that data which can give you a better overview where are you spending your money.
The goal is to have a single file self contained which has enough information to make some decisions.
A complete report example can be found in the example
folder.
The expected input has to be stored as a .csv
file inside the input folder
with the following format:
"Date";"Description";"Value";"Account";"Category";"Subcategory";"Tags"
"dd/mm/yyyy";"My expense name";"-xxx.xx";"Wallet";"category name";"subcategory name";" (currently not used)"
"dd/mm/yyyy";"My income name";"xxx.xx";"Wallet";"category name";"subcategory name";" (currently not used)"
Note that the differentiation between of incomes and expenses is only done by the sign of the value. Date
, Note
, Amount
, Income/Expense
, and Category
are mandatory fields.
- Date: Date. Date in the format
%m/%d/%Y
. - Amount: Float.
- Income/Expense: Possible values
EXPENSE
orINCOME
. - Account: Not used.
- Tags: Not used.
- Description: Ma,e pf the transaction.
- category: String. Name of the category of an income/expense.
- subcategory: String Name of the subcategory of an income/expense within a category. Not mandatory.
python 3.10
should be installed, although3.9
may work it has not been tested.
- Docker is installed.
-
Clone the project or download the last release.
-
Is recommended to use a virtual environment:
pip install virtualenv python -m virtualenv .venv .\.venv\Scripts\activate
-
Install the python dependencies
python -m pip install --upgrade pip pip install -r requirements.txt
- No installation is required.
- You can make use of the
docker-compose.yaml
provided. - Place your expenses
.csv
files in theinput
folder. - Start the docker compose with
docker-compose up
. - The report shall be generated in the
output
folder.
-
Install the dependencies with
pip install -r requirements.txt
-
Place the expenses csv files inside the
input
folder. -
Execute the
interactive_expenses_report.py
script with:python .\interactive_expenses_report.py
-
The report will appear generated with the current date in the
output
folder.
The settings that could be changed like currency
or the report title
can be changed in the settings.py
file. This is currently only supported in the non docker mode.
- Create docker images:
-
Build the docker image with
docker build --tag interactive-expenses-report:x.y.z .
-
Create the tags:
docker tag interactive-expenses-report:x.y.z nck974/interactive-expenses-report:xyz docker tag interactive-expenses-report:x.y.z nck974/interactive-expenses-report:latest
-
Push the images to the registry:
docker push nck974/interactive-expenses-report:x.y.z docker push nck974/interactive-expenses-report:latest
-
This project took more than 13h
(measured thanks to wakapi) at a rate of around 1 coffee each 2h. If this is useful consider donating one coffee, adding a start or proposing features.