Convert currencies from financial statement using historical data.
It consists of two parts:
- Fetching historical exchange rates from the previous year and stores them in a db.
- Process financial statement and saves the output.
uv install- Set env variables:
export DATA_SOURCE=...
export CURRENCY_BEACON_API_KEY=...- Make sure you have installed packages and env variables are set
- Update script
generate_rateswith correct values -> year / base currency / output currency - Run
python3 generate_rates.py
- Make sure you have installed packages and env variables are set
- Make sure
DATA_SOURCEpoints to a correct input file - The input file should have these columns:
- Date
- Description
- Money in
- Run
python3 generate_rates.py
There is no plans for the future. Hopefully I won't have to run it more than once a year, so I don't see a need to update it any further, but if I did I would:
- Add parameters to
generate_ratesscript. They should be taken from the command line. - Pass input file as a parameter for
convertscript. - Add more tests