Skip to content

davidemanini/ing.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 

Repository files navigation

ing.py: A tool for analysing your ING bank account

Introduction

ING is a popular bank in Italy which implements home-banking. On its website, you can download a spreadsheet file containing your transaction. Unfortunately, the format used by ING is not standard and quite difficult to use in a script. The aim of this tool is provide an easy way for keeping track of your ING bank account.

Dependencies

In order to work properly, this programs depends only on the python3 standard library. An optional dependence on matplotlib is required if you want to plot.

Installation

Just clone this repository by git clone https://github.com/davidemanini/home_configuration.git. ing.py is a self-contained script.

Usage

$ ing.py [options] [action]

ing.py relies on a database stored in the folder $HOME/.ing (by default). The idea is that you peridically (say, once a month) import an xls file to your database, and then analyze the bank data stored in the database.

Add movements to your database

  • Log in into your ING account.
  • Go to "Conto corrente" > "Altre azioni" > "Scarica i movimenti"
  • Chose the time range (default is fine) and select CSV as file format.
  • Then click on "Scarica" (Download). This will let you download a file whose name is of the form <IBAN>_ListaTransazioni_<StartDate>_<EndDate>.csv
  • Save this file into "~/Downloads", without changing its name.
  • At this point you can add these movements to your database
    $ cd ~/Downloads
    $ ing.py --input `<IBAN>_ListaTransazioni_<StartDate>_<EndDate>.csv` --add-to-db
    
    The first time you perform this operation, you will see a message of the form
    Created data directory /home/user/.ing.
    
  • Remember to repeat this operation, so that the time intervals of files you downloaded overlap. This means at least once every 3 months (or better once a month).

Print daily amount

  • The action --daily-amount prints the daily amount of your bank account in a CSV format, e.g.
$ ./ing.py --daily-amount
date,amount
2022-03-13,123.45
2022-03-14,123.45
2022-03-15,124.45

Plot daily amount

  • You can plot the daily amount of your account using the action --plot-amount.

Export to JSON

  • The action --to-json exports your account data in a JSON format (useful for scripting).

Options

  • All actions are susceptible to the options --before, --after, --not-before, and --not-after with self-explaining meaning. Dates are in the format YYYY-MM-DD.
  • --output <file> redirects the standard output to <file>.
  • --input <file> uses '' in place of the database as input file. <file> must be either a JSON file (generated by the --to-json action) or a XLS file (downloaded from the ING website). This option is compulsory for the action --add-to-db.
  • --data-dir <directory> selects a database directory (by default it is $HOME/.ing).

About

ing.py. A tool for analysing your ING bank account.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages