I developed this, and therefore have the full git commit history, in my
personal "Small-Hacks" repository, which can be cloned from:
git://gitorious.org/bkuhn/small-hacks.git
More details on that are available by visiting:
https://gitorious.org/bkuhn/small-hacks
The basic idea here is that given non-profit-test-data.ledger herein,
there should be a script that I could run, in this fashion:
$ general-ledger-report -b 2011/03/01 -e 2012/03/01 -f tests/non-profit-test-data.ledger
that would generate:
non-profit-test-data_chart-of-accounts.txt
non-profit-test-data_general-ledger.ods
Note that the ODS file currently has placeholders, as I haven't fully
figured out how to use the =hyperlink() function to make relative
hyperlinks.
Upon discussion with John Wiegley <johnw@newartisans.com> on #ledger on
irc.freenode.net, the following was indicated:
<johnw> bkuhn: as long as the GPL infection stays in contrib, I see no problem
with it
...
<bkuhn> ... I got the ... answer, which is "johnw will accept GPL'd stuff
in contrib/..., as long as it's careful to not cause GPL to cover
the main Ledger codebase that's not in contrib/..."
Therefore, the non-profit-audit-reports/ application will be licensed
GPLv3-or-later.
Thanks to Chad Voegele, see mailing list ledger-cli@googlegroups.com:
Whenever I had a transaction such as
2010/09/10 * castle bar, nyc (beer)
the transaction.from_lnum function would recognize (beer) as the code
for the transaction which is incorrect since it comes at the end of
the line.
Message ID:
73e397f4-234e-46fe-87e5-45f86f934bf1@k30g2000vbn.googlegroups.com
By using
call LedgerToggleTransactionState(line('.'), ' *?')
the state of the transaction will toggle through:
no state -> * -> ? -> no state -> …
beginning at what ever state it currently has.
Adjust to your liking.
Thanks to Chad Voegele for the suggestion.
This allows you to set the effective date in a convenient way.
Maybe I will add date selection using calendar.vim by Yasuhiro
Matsumoto. Until then, you can map this to use today's date:
call LedgerSetDate(line('.'), 'effective')
To try this, map or call the following function:
LedgerSetTransactionState('') – removes state
LedgerSetTransactionState('*') – sets 'checked' state
…
The logic used to distinguish the different parts
of the first line of a transaction is rather basic
but proved to work so far.