summaryrefslogtreecommitdiff
path: root/src/mask.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-03-05 22:12:32 -0500
committerJohn Wiegley <johnw@newartisans.com>2010-03-05 22:14:14 -0500
commit33187220891dd8826ff4d5a53b724b0058f6fef9 (patch)
tree79328965f8c183d92267ca46585d4640f72eb982 /src/mask.h
parentdc1b3907207cc5ccf3d27a01aa877e841bf7ac6f (diff)
downloadfork-ledger-33187220891dd8826ff4d5a53b724b0058f6fef9.tar.gz
fork-ledger-33187220891dd8826ff4d5a53b724b0058f6fef9.tar.bz2
fork-ledger-33187220891dd8826ff4d5a53b724b0058f6fef9.zip
Added new "payee" and "capture" directives
The payee directive allows for transformation of payee names during the parsing of a Ledger file. This means you can record the payee name in one form, but always have it reported in another form. The syntax is (and will be): payee PAYEE_NAME REGEXP or payee PAYEE_NAME REGEXP1 REGEXP2 ... The account directive sets the account automatically based on the payee iff the base account name is Unknown. For example, if you have a bunch of transaction in Expenses:Unknown, you can assign accounts for several automatically using: account ACCOUNT_NAME PAYEE_REGEXP or account ACCOUNT_NAME PAYEE_REGEXP1 PAYEE_REGEXP2 ...
Diffstat (limited to 'src/mask.h')
-rw-r--r--src/mask.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mask.h b/src/mask.h
index 8c20e554..755a2229 100644
--- a/src/mask.h
+++ b/src/mask.h
@@ -74,6 +74,9 @@ public:
mask_t& operator=(const string& other);
+ bool operator<(const mask_t& other) const {
+ return expr < other.expr;
+ }
bool operator==(const mask_t& other) const {
return expr == other.expr;
}