aboutsummaryrefslogtreecommitdiffstats
path: root/ledgerscripts/get_categories.pl
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ledgerscripts/get_categories.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/ledgerscripts/get_categories.pl b/ledgerscripts/get_categories.pl
index 554efe6..ae5bad5 100644
--- a/ledgerscripts/get_categories.pl
+++ b/ledgerscripts/get_categories.pl
@@ -15,8 +15,8 @@ local $/ = ""; # switch to paragraph mode (allow use of /m modifier below)
while (<>) {
# we only want true expenses, no income, rebates, pocket money, etc
# Not all undesirable cases will be found based on this so be warned!
- next if (/Pocket Money|Income|Assets|[Rr]ebate/);
+ next if (/Pocket Money|Income|Assets|[Rr]ebate|Unknown/);
next if (/-£/);
if (/\d{4}.*\* (.*)$/m) { print $1 . "@" };
- if (/Expenses:(.*)£/) { print $1 . "\n" };
+ if (/Expenses:(.*)£/) { my $cat = $1; $cat =~ s/\s*$//; print $cat . "\n" };
}