>>>>> Seppo Sade <[email protected]> writes:

> Ledger's command-line interface and plain text storage are great. But as my
> ledger usage grows and becomes ever more complex and integrated with
> external tools, I would prefer a programmatic library interface to
> ledger. Such an interface would for example allow me to generate
> transactions (from some external source) within a programming language and
> feed them to ledger, without having to generate intermediate text files. It
> would perhaps also make it easier to inspect the data programmatically by
> providing first-class ledger-related data types (transactions, accounts and
> so on). Personally I would prefer the language to be from the Lisp-family,
> for example Scheme, but any high-level language would do.

C++ Ledger is already implemented as a library, which the "main driver"
links.  I have, in the past, linked a Cocoa UI to this library.

If you'd like to use libledger.a, you'll need to #include <ledger/session.h>.
See src/main.cc for an example of how the main driver uses that code.  You may
or may not want to use a global scope object, but you must use at least one
session object.

John

Reply via email to