diff options
Diffstat (limited to 'ledgerscripts/get_categories.pl')
-rw-r--r-- | ledgerscripts/get_categories.pl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ledgerscripts/get_categories.pl b/ledgerscripts/get_categories.pl index fc4fa96..554efe6 100644 --- a/ledgerscripts/get_categories.pl +++ b/ledgerscripts/get_categories.pl @@ -13,6 +13,10 @@ use warnings; 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 (/-£/); if (/\d{4}.*\* (.*)$/m) { print $1 . "@" }; if (/Expenses:(.*)£/) { print $1 . "\n" }; } |