Commit graph

101 commits

Author SHA1 Message Date
John Wiegley
2728e4d55e Changed the way that account balances are computed 2009-03-06 00:27:29 -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
5a194cbdf4 Allow value expressions access to session options 2009-02-24 22:10:41 -04:00
John Wiegley
a8a87ab908 Added "date" valexpr to session, for bal -V 2009-02-24 21:07:05 -04:00
John Wiegley
944c63e6f2 The Great Renaming, Part II
The last commit did not contain the majority of changes because of a
slight mishap.  This contains the real changeset.
2009-02-23 19:07:30 -04:00
John Wiegley
e124811d8a Added --exchange (-x) option
This is like -V, except it lets you specify the goal commodity to report
in terms of, for example:

    reg -x CAD
2009-02-22 04:51:11 -04:00
John Wiegley
96782df17c Enabled --current option 2009-02-20 19:10:34 -04:00
John Wiegley
f2f52066d2 Added a --strict session option
When enabled, if any accounts or commodities are seen in an uncleared
transaction, which were not seen previously in a cleared or pending
transaction or a textual directive dealing with accounts or commodities,
a warning is generated about the unknown item.
2009-02-19 22:36:08 -04:00
John Wiegley
ec08dee745 Always perform tilde expansion on input pathnames 2009-02-18 21:00:02 -04:00
John Wiegley
2ec9b6a7b2 Split up session_t::reread_journal_files()
You now call session_t::close_journal_files() followed by
session_t::read_journal_files().
2009-02-15 19:32:15 -04:00
John Wiegley
70344b82e7 Added a "reload" command, for use at the REPL
Created a new function, session_t::reread_journal_files, which throws
away all previous state data and reads in the same files again.  This is
needed to allow Emacs to communicate with Ledger via the REPL, so that
it tell Ledger when it has made changes to the user's data file.
2009-02-13 05:24:28 -04:00
John Wiegley
3c3606aa0d Break libledger_data's dependency on session_t. 2009-02-09 18:46:01 -04:00
John Wiegley
47567307ce Removed reference to session_t from the iterators module. 2009-02-09 17:41:55 -04:00
John Wiegley
2d5ad7dee8 Added support for value expression definitions.
Example:

  ] expr f(x) := x + 100
  ] expr f(100)
  200
2009-02-08 04:30:05 -04:00
John Wiegley
71591555fd Added --leeway option (for quote downloading) into session_t. 2009-02-07 21:55:51 -04:00
John Wiegley
589eabd8e6 Threw away the "multiple parser" infrastructure. 2009-02-07 17:45:48 -04:00
John Wiegley
ea9330adae Allow value expressions to gain access to option settings.
For example, "ledger eval options.limit" prints 0 (for false), but:
"ledger -l hello eval options.limit" print "hello"s, since the value of
options.limit, once set to a value, is that string.  For flag options,
such as -Y, eval prints 0 if unset, and 1 if set.

This feature allows value expressions to be conditionalized based on the
presence of user options.
2009-02-07 05:47:21 -04:00
John Wiegley
eb98e0da8b More revision to the way options are handled; reworked CSV command. 2009-02-07 04:26:30 -04:00
John Wiegley
c1bf4bdf69 Moved the --abbrev-len option to report_t. 2009-02-06 23:38:12 -04:00
John Wiegley
cf6babcf90 Restored all the option handlers from 2.6.2, but not the options themselves. 2009-02-06 03:31:41 -04:00
John Wiegley
d853a58f5f Moved --pager handler back into report_t. 2009-02-05 21:54:46 -04:00
John Wiegley
408b819c6e Greatly simplified the way option and command handlers are defined. 2009-02-05 21:20:09 -04:00
John Wiegley
0e2a3a9c00 Moved much of the main.cc code into a new global_scope_t class. 2009-02-05 04:06:58 -04:00
John Wiegley
db52ad86d5 Don't give an error if the init file cannot be found. 2009-02-05 02:16:43 -04:00
John Wiegley
3f960be96c Removed all references to the old binary cache. 2009-02-04 20:57:14 -04:00
John Wiegley
f8ba4165fe Clear the master account totals after a report is done. 2009-02-04 20:46:56 -04:00
John Wiegley
7d628d88ff Moved the --pager option to the session object, rather than the report object. 2009-02-04 20:46:45 -04:00
John Wiegley
2d941730b1 Largely removed all of Ledger's use of global variables, for the REPL's sake. 2009-02-04 19:55:27 -04:00
John Wiegley
1cc33531ea Simplified the textual parser, and improved metadata support. 2009-02-04 03:34:37 -04:00
John Wiegley
3434650848 Removed the binary caching code, and the XML, QIF and Gnucash parsers. 2009-02-03 12:22:10 -04:00
John Wiegley
c1cb06e009 Updated some internal documentation. 2009-02-02 15:54:28 -04:00
John Wiegley
fb5428ce85 Added support for metadata and tagging, and made regexs a first-class type. 2009-02-01 22:10:32 -04:00
John Wiegley
9d267fa133 Inspired by Omari Norman, I've rewritten main.cc so it's easy to approach. 2009-01-31 18:52:34 -04:00
John Wiegley
54e24a4aa2 Fixed some tracing labels. 2009-01-30 00:40:59 -04:00
John Wiegley
900a92e115 Added support for Unicode text in Ledger files, thanks to 'utfcpp', which can
be located at http://utfcpp.sourceforge.net.
2009-01-23 19:50:00 -04:00
John Wiegley
59a71e7d74 Changed grammatical tense in two tracing statements. 2009-01-23 15:45:17 -04:00
John Wiegley
eb04b8be85 Changed the order in which options are processed, to provide for the correct
overrides.

  1. Global defaults
  2. Environment variable settings
  3. Initialization file
  4. Command-line arguments

Whatever is later in the list overrides what is earlier.
2009-01-21 18:54:06 -04:00
John Wiegley
e4c7b1753b Resolve outstanding stdin parsing issues by buffering the data. 2009-01-21 18:30:37 -04:00
John Wiegley
887828a40c Increased copyright range to include 2009. 2009-01-20 01:53:31 -04:00
John Wiegley
83648af19f Added the concept of a "display_total", used for showing the values in the
totals column of both the register and balance reports.  This is different
from the internal calculated total, which is still "total_expr".
2009-01-19 22:27:10 -04:00
John Wiegley
3bea2b1181 Output newlines between entries using format strings, not hard-coded. 2009-01-14 00:32:37 -04:00
John Wiegley
fdc7a4e4c5 Factored common parts of entry_t and xact_t into new item_t 2008-09-19 08:06:20 -04:00
John Wiegley
bdc180ff9c Don't use single code format characters anymore. Access to object details
will now always be done with "%(identifier)".
2008-09-18 11:25:56 -04:00
John Wiegley
1b083919c0 Restored the 'print' command. 2008-09-17 21:09:15 -04:00
John Wiegley
e10364e136 Corrected the formatting of second-lines in the register report. 2008-08-14 02:12:47 -04:00
John Wiegley
5f0b25ab9a The -f flag now works again. 2008-08-13 03:55:16 -04:00
John Wiegley
b588dc4caf Changed the default output date format in register reports from 2008-08-13 to
08-Aug-13.  This allows for the account name to be one character wider, while
the century was never significant in people's minds, whereas the change in
months between two transactions sometimes is.
2008-08-13 03:12:25 -04:00
John Wiegley
ace4b65487 The register report is now mostly displaying multi-line balances correctly.
It still shows lots even when --lots isn't specified, though.
2008-08-10 03:49:03 -04:00
John Wiegley
c9d575abce Basic balance reports are working again! 2008-08-10 00:57:29 -04:00