Commit graph

78 commits

Author SHA1 Message Date
John Wiegley
4681e58d7f Converted the Ledger build system to use CMake 2012-05-20 04:48:05 -05:00
John Wiegley
f4f3058b8c Switch to using Boost.Format 2012-05-14 21:44:00 -06:00
John Wiegley
22505d9527 Always call TRACE_CTOR at the end of constructors 2012-03-20 02:10:40 -05:00
John Wiegley
f9088f8836 Added --verify-memory and missing TRACE_[CD]TOR calls 2012-03-18 01:01:30 -05:00
John Wiegley
d93c5a7d43 Corrected a typo 2012-03-11 04:02:25 -05:00
John Wiegley
7e250696e0 Many options now have additive effect
For example, -A and -V used to override each other, whereas now:

  -A    report the average amount
  -V    report all amounts at current value
  -AV   report the current value of the average
  -VA   report the average of all current values
2012-03-07 12:46:46 -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
052b1f28b7 Chain the current report to the current session 2012-02-27 12:38:06 -06:00
John Wiegley
968a6f3c0a Changes for building with Visual Studio 2008 2010-06-15 05:14:00 -04:00
John Wiegley
dcffd218a1 Revised how Ledger handles the "current year"
Now when the Y directive sets the current year for a region, it affects
everything, as if the clock really were set back to that year.
2010-06-14 03:23:09 -04:00
John Wiegley
dea2aed0b5 Untabified all source files 2010-06-11 17:02:25 -04:00
John Wiegley
b848ace768 Allow opt -NDEBUG build to complete without warnings 2010-06-04 06:02:00 -04:00
John Wiegley
ab416f759f Updated copyrights to 2003-2010 2010-03-05 22:14:10 -05:00
John Wiegley
b5dca67396 Moved report normalization into report.cc 2009-11-12 03:31:53 -05:00
John Wiegley
c3535d06c8 Redesigned the expr_t, predicate_t, query_t classes 2009-11-09 02:06:06 -05:00
John Wiegley
1bb2261c99 Fixed -r flag for balance reports 2009-11-07 08:36:27 -05:00
John Wiegley
832e53f300 Column widths are always calculated now 2009-11-07 05:17:00 -05:00
John Wiegley
61f7d1295f Changed dividers output by --options 2009-11-06 02:05:39 -05:00
John Wiegley
34ee358f5e Moved journal reading code into journal_t 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
3909d2678e Removed most #if 0 blocks and callout comments 2009-10-31 04:50:07 -04:00
John Wiegley
4becc1f938 Added two missing casts 2009-10-31 00:14:17 -04:00
John Wiegley
63aa8992a8 Moved ownership of master account into journal_t
The journal_t now completely represents the data part of a session.
2009-10-30 19:03:28 -04:00
John Wiegley
55f5868380 Setting --date-format in ~/.ledgerrc works again 2009-10-29 00:52:51 -04:00
John Wiegley
2b2ffb7787 If isatty is available, no colors/pager for non-ttys 2009-10-29 00:23:57 -04:00
John Wiegley
16dbd019bc Colorization at the terminal now on by default 2009-10-28 02:13:54 -04:00
John Wiegley
6c9cf1237e Whitespace change 2009-10-27 22:25:19 -04:00
John Wiegley
828a1e8bf9 Added --actual-dates, for overriding --effective
This is so that if someone has --effective in their .ledgerrc, they can
force the use of actual dates.
2009-10-27 21:34:08 -04:00
John Wiegley
fc84eeb358 Rewrote the way date and time I/O is managed 2009-10-25 05:01:47 -04:00
John Wiegley
5ac73e1a1f The print command now implies --actual 2009-06-28 17:37:16 +01:00
John Wiegley
2cec787182 Disable use of ~/.pricedb when --args-only is present 2009-06-28 16:11:45 +01:00
John Wiegley
4574c30fcf The --download option is now fully restored 2009-06-26 16:52:41 +01:00
John Wiegley
1fad2ec7c1 More refactoring for --download 2009-06-24 18:08:56 +01: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
440124eacc Restored --download, although not done yet
The problem at this point is that it's recording prices in the price
database multiple times; it should only need to download a price for
each commodity once per day.
2009-06-24 02:44:07 +01:00
John Wiegley
f8c3b4cad8 Fixed the --args-only option (sequence problem) 2009-06-22 00:29:14 +01:00
John Wiegley
269c0ccb7c Added a code comment 2009-06-18 18:55:42 +01:00
John Wiegley
86dfc1e0be The -X option now accepts price settings
For example, if you had 100 AU (onces of gold) and wanted to report it
in dollars, but at a price of $997 per ounce, you could now easily say:

  ledger bal -X '$,AU=$997'
2009-06-18 18:50:49 +01:00
John Wiegley
8d97adec7b Restored --plot-amount-format, --plot-total-format 2009-06-18 16:08:43 +01:00
John Wiegley
a64c249efb Allow --period flag to specify a report range 2009-06-17 17:15:29 +01:00
John Wiegley
c79fd9e72d Added new debug option --options
This reports which options are in place before invoking a command, and
where exactly each option value came from.
2009-06-02 19:14:46 +01:00
John Wiegley
dda7c3a58a Rewrote the date interval parser/stepper
The new implementation uses boost::gregorian::date_duration objects,
rather than manually stepping.
2009-03-23 01:22:26 -04:00
John Wiegley
110f0b8023 Enabled use of pre-compiled headers by default 2009-03-10 17:02:03 -04:00
John Wiegley
fb9af0f111 Removed the --totals option 2009-03-05 23:26:21 -04:00
John Wiegley
17cbb9d210 If Python is not in use, global includes session 2009-03-05 16:55:46 -04:00
John Wiegley
c11d325712 Reduced the #include dependency tree to a minimum 2009-03-04 23:53:43 -04:00
John Wiegley
9d4e888ef5 Cured several harmless compiler warnings 2009-03-04 04:31:34 -04:00
John Wiegley
eb45a0a4f4 Normalized how account totals are calculated 2009-03-03 17:08:11 -04:00
John Wiegley
38122c2224 Corrected warnings g++-4.3.3 was complaining about 2009-02-28 04:54:54 -04:00