From 1ee2a23bf45574ec9182f932f82007b91e3cd9d3 Mon Sep 17 00:00:00 2001 From: christopherlam Date: Fri, 5 May 2017 16:31:51 +0800 Subject: Update README.md --- README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cf984b3..51a8dba 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # GNU Cash XML Library -`gnucashxml` is a [Python][] library to parse [GNU Cash][] XML files. +`gnucashxml` is a pure [Python][] library to parse [GNU Cash][] XML files. This allows writing reporting utilities that do not rely on the GNU Cash libraries themselves, or require the main program to run at all. -Tested with GNU Cash 2.4.10. +Tested with GNU Cash 2.6.16. The library supports extracting the account tree, including all prices, transactions and splits. It does not support scheduled @@ -36,6 +36,12 @@ These classes all have a `slots` member, which is a simple dictionary for extra information. GNU Cash information such as "hidden" are recorded here. +It allows you to: +- open existing Gnucash documents and access accounts, transactions, splits + +Scripts are available to: +- export to ledger-cli format (http://www.ledger-cli.org/) + ## Example ```Python @@ -55,3 +61,10 @@ print "Total income : {:9.2f}".format(income_total * -1) print "Total expense: {:9.2f}".format(expense_total) ``` +Print list of account names: +```Python +import gnucashxml +with gnucashxml.from_filename("test.gnucash") as book: + for acc in book.accounts: + print(acc.fullname()) +``` -- cgit v1.2.3