This is a reusable library containing hledger's core functionality.

hledger is a computer program for easily tracking money, time, or
other commodities, on unix, mac and windows (and web-capable mobile
devices, to some extent).

It is first a command-line tool, but there are also terminal and web
interfaces, and a Haskell library
(http://hackage.haskell.org/package/hledger-lib) for building your own
programs and scripts (hledger is written in Haskell).  hledger was
inspired by and is largely compatible with Ledger.  hledger is free
software available under the GNU General Public License v3+.

hledger aims to help both computer experts and regular folks to gain
clarity and control in their finances and time management, but
currently it is a bit more suited to techies.

Homepage:
http://hackage.haskell.org/package/hledger-lib
