Commit graph

30 commits

Author SHA1 Message Date
Alexis Hildebrandt
2b9208e850 Bump copyright information to 2014 2014-02-02 12:36:22 +01:00
John Wiegley
0951bcebef Bump copyright information to 2013 2013-02-18 06:51:21 -06:00
John Wiegley
a1c33fec02 Allow dates to be passed to Python value() method 2012-03-30 00:51:06 -05:00
John Wiegley
363670d35b Tighten up argument passing related to fn_market() 2012-03-11 03:55:25 -05:00
John Wiegley
b1107f85ae Removed value_t::price and balance_t::price 2012-03-07 10:32:24 -06:00
John Wiegley
f6c087cfe4 Added a new 'python' directive 2012-03-01 17:32:51 -06:00
John Wiegley
e2afc783db Increased file copyrights to 2012 2012-02-29 22:32:23 -06:00
John Wiegley
dea2aed0b5 Untabified all source files 2010-06-11 17:02:25 -04:00
John Wiegley
92d2eb9574 Use ptr_deque for value_t::sequence_t
This is to work around undefined behavior according to the Standard,
[lib.res.on.functions]/2:

"In particular, the effects are undefined in the following cases: [..]
- if an incomplete type (3.9) is used as a template argument when
instantiating a template component."
2010-06-10 16:32:24 -04:00
John Wiegley
be6cef93c4 A further simplification of -V and -X
With -X COMM, all values are computed in terms of COMM, regardless.

With -V, only secondary commodities will ever be computed, never
primaries.  Further, if a secondary commodities has an associated price,
the valuation is done in terms of that price's commodity.
2010-06-07 09:49:17 -04:00
John Wiegley
ab416f759f Updated copyrights to 2003-2010 2010-03-05 22:14:10 -05:00
John Wiegley
d5e957204c Fixed Ledger/Python byte vs. char Unicode bridge 2009-11-20 23:23:44 -05:00
John Wiegley
aa086686ea Normalized the value() method for Python numerics 2009-11-20 17:40:15 -05:00
John Wiegley
4e30fcdf40 Many improvements to Ledger's Python bindings 2009-11-19 22:24:24 -05:00
John Wiegley
f0f1b0cdfa Value.to_sequence returns a valid Python sequence 2009-11-11 04:46:38 -05:00
John Wiegley
afe87280e0 Added floored() and in_place_floor() methods 2009-11-11 03:39:53 -05:00
John Wiegley
4a4ff9d4b2 Value.basetype in Python returns a Value's base type 2009-11-11 02:58:06 -05:00
John Wiegley
5e3f3d7f47 Report sought magnitude when balancing errors occur 2009-11-05 17:43:28 -05:00
John Wiegley
8bd16b2e8e Simplified usage of Boost.Python in several cases 2009-11-05 02:27:42 -05:00
John Wiegley
78e6770c4c Segregated symbols into 5 separate namespaces
The different namespaces are:

  Function      Value expression functions, which receive a "context"
  Option        Command-line options
  Precommand    Commands which are invoked before reading the journal
  Command       Commands which are invoked after reading the journal
  Directive     Directives that occur at column 0 in a data file

This greatly eases the ability for Python uses to add intercept hooks to
change how the basic Ledger module functions.  An example of what should
be possible soon:

  import ledger

  def my_foo_handler(value):
      print "--foo received:", value

  ledger.add_handler(ledger.Option, "foo=", my_foo_handler)
2009-11-04 20:40:48 -05:00
John Wiegley
6d835e52f5 Changed two callout comments 2009-11-03 14:51:36 -05:00
John Wiegley
7c79a745d3 Whitespace fix 2009-11-03 08:21:53 -05:00
John Wiegley
3043faf79f Completed Python bindings for value_t 2009-11-02 22:51:21 -05:00
John Wiegley
3909d2678e Removed most #if 0 blocks and callout comments 2009-10-31 04:50:07 -04:00
John Wiegley
7ca80112fc Change the value_t::POINTER type to value_t::SCOPE
scope_t pointers are the only kind that are ever stored in value
objects, so there was no need to make it generic and use boost::any.
2009-10-30 17:57:29 -04:00
John Wiegley
991e3a3eaf Split commodity.h/cc into three files
commodity.h - code for commodity_t
annotate.h  - commodity annotations
pool.h      - commodity pool management
2009-06-24 16:43: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_value.cc (Browse further)