This little tool exports all the transactions of a local hledger journal to an arbitrary InfluxDB instance. The source code is an adapted version of the contents presented in this article by Michael Walker.
- A Haskell development environment
- cabal
3.10.1.0
- GHC
9.6.5
- GHCup
0.1.20.0
- cabal
- An InfluxDB (version
1.x
) server - A local hledger journal file
- A
LEDGER_FILE
environment variable pointing to the journal
- Currently this tool only handles journals using
€
as currency. However, this may be changed by replacing€
inExporter.hs
with your desired currency
Make sure you have Haskell installed, preferrably using GHCup.
- Navigate to the project directory in your terminal
- Run
cabal build
- Copy
.env.example
to the build output directorycp .env.example ./dist-newstyle/build/x86_64-windows/ghc-9.6.3/hledger-influxdb-exporter-0.1.0.0/x/hledger-influxdb-exporter/build/hledger-influxdb-exporter/.env
- Modify the
.env
file to point to your InfluxDB server - Run the application
- Make currency configurable
- Properly handle transactions without description
- Be able to deal with multi currency journals