Commit graph

32 commits

Author SHA1 Message Date
John Wiegley
0951bcebef Bump copyright information to 2013 2013-02-18 06:51:21 -06:00
John Wiegley
f9088f8836 Added --verify-memory and missing TRACE_[CD]TOR calls 2012-03-18 01:01:30 -05:00
John Wiegley
9ec9cdf41e Started writing Python unit tests 2012-03-01 05:50:07 -06:00
John Wiegley
944e580825 Refactored the notion of "the current parsing context" 2012-03-01 03:31:28 -06:00
John Wiegley
e2afc783db Increased file copyrights to 2012 2012-02-29 22:32:23 -06:00
John Wiegley
c3a9a7d2c5 Fixed many Clang type conversion warnings with static_cast 2012-02-17 15:17:52 -06:00
John Wiegley
e7ff3945d5 #if 0'd some unused Python bridge code 2012-02-17 15:09:32 -06:00
John Wiegley
cf35984971 Use Boost iterator_facade to create new iterators 2011-07-19 23:29:41 -05:00
John Wiegley
2208ac1226 Fixes for compilation as C++0x code 2011-02-04 22:39:41 -05:00
John Wiegley
dea2aed0b5 Untabified all source files 2010-06-11 17:02:25 -04:00
John Wiegley
39f9854e2c Reworked the way that <Rounding> entries are shown
Fixes #188 / 53BCED29-F3B9-4E02-9A35-6C739ABB9662
2010-06-06 06:20:07 -04:00
John Wiegley
51115f0a91 Updated to Boost 1.43 2010-05-27 21:35:41 -06:00
John Wiegley
ab416f759f Updated copyrights to 2003-2010 2010-03-05 22:14:10 -05:00
John Wiegley
4e30fcdf40 Many improvements to Ledger's Python bindings 2009-11-19 22:24:24 -05:00
John Wiegley
3bec708e38 Fixed an internal reference issue with Python 2009-11-14 06:11:45 -05:00
John Wiegley
49a356f2d2 Added a Journal.collect method to Python
This lets you run standard report queries against a Ledger journal and
get back a collection of postings, for example:

    import ledger

    journal = ledger.Journal("sample.dat")
    posts   = journal.collect("-M assets")
    for post in posts:
        print post.account

However, this code is not really working yet for a large variety of
reasons, having to do with object life-time, shallow copying, and lack
of reference counting where it should be.  For instance, calling
ledger.Journal().collect() fails because the temporary journal object is
destroyed and the collection now has a host of bad pointers.  Using "for
post in journal.collect()" fails too with other bad pointers.  And the
whole lot of it crashes on exit at the moment.
2009-11-12 05:26:06 -05:00
John Wiegley
65ba928a59 Removed unnecessary code 2009-11-12 05:11:09 -05:00
John Wiegley
48dc654eda Added has_xdata() methods for journal_t and xact_t 2009-11-12 05:11:06 -05:00
John Wiegley
c22b8457ef Did away with the "finalizer" abstraction
This was from an earlier time, when it was intended to be used by
Python.  But it's not needed anymore.
2009-11-11 18:29:21 -05:00
John Wiegley
e8ea2d4938 Automated postings defer amount expression calculation
This allows for value expressions to be used which reference the
incoming posting, for example:

  = Income:Clients:
    (Liabilities:Taxes:VAT1)  (floor(amount) * 1)
    (Liabilities:Taxes:VAT2)  0.19

  2009/07/27 * Invoice
    Assets:Bank:Checking                           $1,190.45
    Income:Clients:ACME_Inc

The automated posting for VAT1 will use the floored amount multiplied by
a factor, while the posting for VAT2 multiples the whole amount as
before.
2009-11-11 04:22:37 -05:00
John Wiegley
98bf53eabc Expose journal_t::read to Python 2009-11-07 08:36:24 -05:00
John Wiegley
06f4c27867 Renamed journal_t::basket to bucket 2009-11-07 06:39:50 -05:00
John Wiegley
8bd16b2e8e Simplified usage of Boost.Python in several cases 2009-11-05 02:27:42 -05:00
John Wiegley
34ee358f5e Moved journal reading code into journal_t 2009-11-05 02:27:42 -05:00
John Wiegley
3dc200983d Moved xdata clearing code into each type proper 2009-11-05 02:27:39 -05:00
John Wiegley
40a430139e Transactions, etc., are now accessed by iterators 2009-11-05 02:22:17 -05:00
John Wiegley
682518fcee Added Python interface for journal_t 2009-11-03 08:48:30 -05:00
John Wiegley
bf30f989f6 Removed some dead code 2009-06-27 01:32:46 +01:00
John Wiegley
110f0b8023 Enabled use of pre-compiled headers by default 2009-03-10 17:02:03 -04:00
John Wiegley
c11d325712 Reduced the #include dependency tree to a minimum 2009-03-04 23:53:43 -04:00
John Wiegley
238bd7f8a5 Marked all strings needing internationalization
These strings are now collected automagically in the file po/ledger.pot.
If you'd like to produce a translation, just run this command after
building Ledger:

    msginit -l LOCALE -o LANG.po -i po/ledger.pot

Where LOCALE is a string like de or en_GB, and LANG is a short
descriptive word for your language.

Then send me this .po file so I can commit it to the Ledger sources
(alternatively, you could maintain the file in a fork on GitHub), and
setup the build script to format and install your new message catalog
during a "make install".
2009-02-25 03:51:42 -04:00
John Wiegley
1799ed3a2a Moved python/*.cc files into src/
This is because soon, I intend to have real Python source files in
python/.
2009-02-24 16:08:49 -04:00
Renamed from python/py_journal.cc (Browse further)