Commit graph

117 commits

Author SHA1 Message Date
Alexis Hildebrandt
1dd9dcaab4 Bump copyright notice to 2015
The following script makes it a no-brainer:
% NEXT_YEAR=2015; ag -l 'Copyright.*Wiegley' \
  | xargs sed -i '' -e "s/\(Copyright.*\)-20[0-9]\{2\}/\1-${NEXT_YEAR}/"
2014-12-27 11:24:55 +01:00
ELIPTUS
af571c1047 Improve Embedded Python Support
Discussion:
https://groups.google.com/d/msg/ledger-cli/kq9sKoRX9vw/fmyhvPslzokJ
2014-11-12 22:51:56 -08:00
Martin Michlmayr
2cee0fe23f Cosmetic change - format code consistently
Add a space between if and the opening bracket, between a closing
round bracket and the following opening curly bracket, etc.
2014-05-18 09:51:32 -04:00
John Wiegley
634aa589cd The option --permissive now quiets balance assertions 2014-04-13 23:26:14 -05:00
Peter Feigl
ecd5097d51 Adding option --no-aliases to completely disable alias expansion 2014-02-26 23:50:50 +01:00
Peter Feigl
75b0a5d8ff Adding option --recursive-aliases, adding documentation to man-page and manual 2014-02-26 09:29:31 +01:00
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
Craig Earls
1903ff7c2e Fixed problem finding the default priced file.
Bug fix to detect badly specified priced files on the command line didn't handle the default correctly.
2013-01-29 14:10:08 -07:00
John Wiegley
ec7402fff8 Merge pull request #107 from afh/pull/time_colon
Add --time-colon option
2013-01-29 09:34:08 -08:00
Craig Earls
aba5c1aa46 Fixes bugs 705 and 862. Ledger now fails if init or pricedb files are specified on the command line but not found. 2013-01-29 10:30:18 -07:00
Johann Klähn
3fe2ef5956 change handling of standard input
For `-f /dev/stdin`, the `pathname` of the parsing context will be empty
as for any other streamed input.

`instance_t::include_directive` did not work as expected for `-f /dev/stdin`
and relative file names. One would expect them to be relative to the current
directory rather than `/dev`.

This will lead to `While parsing file ""` messages. This could be
adjusted to read `While parsing standard input`, but maybe it's not
worth the special cases.

This commit also fixes bug 788: behaviour of source_context for '-f -'
2013-01-17 12:19:23 +01:00
John Wiegley
d1c96190e9 Revert "fix bug 788: behaviour of source_context for '-f -'"
This reverts commit 0a1ff03542.
2013-01-16 18:10:30 -06:00
Johann Klähn
0a1ff03542 fix bug 788: behaviour of source_context for '-f -'
`session_t::read_data` did not set context.pathname to `/dev/stdin`
for the special case `-f -`. I chose to adjust `source_context` too
as there is no sensible context if no file name is provided.
2013-01-15 23:03:39 +01:00
Alexis Hildebrandt
36f87f49d8 Add --time-colon option
The --time-colon option will display the value for a seconds
based commodity as real hours and minutes.

For example 8100 seconds by default will be displayed as 2.25
whereas with the --time-colon option they will be displayed
as 2:15.
2012-11-10 12:02:00 +01:00
John Wiegley
4681e58d7f Converted the Ledger build system to use CMake 2012-05-20 04:48:05 -05:00
John Wiegley
22505d9527 Always call TRACE_CTOR at the end of constructors 2012-03-20 02:10:40 -05:00
John Wiegley
22c1b867f0 Added option --day-break 2012-03-17 05:27:43 -05:00
John Wiegley
5e0efb5e8b Fixed options processing of --value-expr 2012-03-09 20:16:44 -06:00
John Wiegley
022059f2a8 Added --value-expr option 2012-03-09 20:11:38 -06:00
John Wiegley
b0cf90ab50 Added int and str value expression functions 2012-03-09 01:29:11 -06:00
John Wiegley
a125f24d29 Allow --options to be added by the user in Python 2012-03-01 23:40:02 -06: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
c1ab9cad30 --explicit wasn't being handled correctly 2012-02-27 12:37:53 -06:00
John Wiegley
5532a1a8b7 Added --check-payees option 2012-02-27 11:52:23 -06:00
John Wiegley
61bc7362ca Added new account/payee/commodity directives
Also added supporting options: --explicit, --permissive, --pedantic, as
well as new behavior for --strict.
2012-02-27 02:31:09 -06:00
John Wiegley
f0791bbd72 Cleanup whitespace 2011-08-18 14:48:38 -04:00
John Wiegley
8388baafd3 Support Boost 1.46 and Boost.Filesystem v3 2011-02-28 16:24:15 -05:00
John Wiegley
c00188d6a8 Increase display precision of hours to 2 places 2010-12-12 19:13:44 -05:00
John Wiegley
1ee16304b4 Transactions no longer needed for budget/forecast
This means you can forecast or budget against a file containing only
periodic transactions.
2010-06-20 20:58:07 -04:00
John Wiegley
47e91a8a92 Added initial implementation of lot_*() functions 2010-06-14 04:40:39 -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
526cbc4c93 Restored min() and max() virtual functions 2010-06-13 23:35:22 -04:00
John Wiegley
ea1642b3f9 Completely reworked argument passing in expressions 2010-06-13 05:02:14 -04:00
John Wiegley
536e3e7322 Added a new scope_value() inline helper function 2010-06-13 01:03:48 -04:00
John Wiegley
15bf3ed39e account(NAME) function can lookup account objects
For example, just the word "account" returns the name of the current
posting's account, but account("Expenses:Food") returns the actual
account object, so that it's total may be accessed.
2010-06-13 01:03:47 -04:00
John Wiegley
dea2aed0b5 Untabified all source files 2010-06-11 17:02:25 -04:00
John Wiegley
038c24357e Changed --european option to --decimal-comma
Fixes #211 / 1736ACA5-5DE6-4826-AEB4-DB5B2A2217AC
2010-06-01 17:56:41 -04: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
b2b0ae37e8 session_t now holds a std::auto_prt<journal_t> 2009-11-12 03:32:10 -05:00
John Wiegley
3f00f8362c Don't use archive_t if boost_serialization unavailable 2009-11-06 16:17:30 -05:00
John Wiegley
a05d39b722 Renamed --set-reported-account to just --account
This fits better with the --amount and --total options, which both
change the amount and total used for calculation.  Same with --account:
it happens after filtering, but before calculation so that balance
reports look as you'd expect.
2009-11-06 02:39:30 -05:00
John Wiegley
05d0f1a17f The binary cache is working again 2009-11-06 02:07:56 -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
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
d9963b0312 Removed an unnecessary comment 2009-11-03 14:51:22 -05:00