aboutsummaryrefslogtreecommitdiffstats
path: root/ledgerscripts
diff options
context:
space:
mode:
authorMatthew Lemon <chaffinach+git@protonmail.ch>2022-04-28 14:23:27 +0100
committerMatthew Lemon <chaffinach+git@protonmail.ch>2022-04-28 14:23:27 +0100
commitc005c07d2b99707fb87b11b27476635015d6d941 (patch)
tree6294f10e583374ad8c89de38f4588d6ac5416915 /ledgerscripts
parentef297ce2c65aead25b755f9cc3ed4b8705733299 (diff)
working through ledger scripts
Diffstat (limited to '')
-rw-r--r--ledgerscripts/apply_categories.pl30
-rw-r--r--ledgerscripts/expense_categories597
-rw-r--r--ledgerscripts/get_categories.pl4
3 files changed, 631 insertions, 0 deletions
diff --git a/ledgerscripts/apply_categories.pl b/ledgerscripts/apply_categories.pl
new file mode 100644
index 0000000..94bb913
--- /dev/null
+++ b/ledgerscripts/apply_categories.pl
@@ -0,0 +1,30 @@
+#!/usr/bin/env perl
+
+use warnings;
+use strict;
+
+
+open (my $cat_file, "<", "expense_categories") or die
+ "Can't open expense_categories file";
+
+my %categories;
+
+while (local $_ = <$cat_file>) {
+ if (/(.*)@(.*)/) {
+ $categories{$1} = $2;
+ }
+}
+close $cat_file;
+
+local $/ = ""; # switch to paragraph mode
+
+while (my $block = <>) {
+ if ($block =~ m/\d{4}.*\* (.*)\n.*(Expenses:.*)£/s) {
+ while (my ($k, $v) = each %categories) {
+ if ($k eq $1) {
+ $block =~ s/$2/Expenses:$v/;
+ };
+ }
+ print $block;
+ };
+}
diff --git a/ledgerscripts/expense_categories b/ledgerscripts/expense_categories
new file mode 100644
index 0000000..39835be
--- /dev/null
+++ b/ledgerscripts/expense_categories
@@ -0,0 +1,597 @@
+PNET1056659-3 DD@Internet:Broadband
+ROYAL LONDON DD@Insurance:Life Assurance
+SANTANDER MORTGAGE DD@Mortgage
+SCOTTISHPOWER DD@Utilities:Electricity & Gas
+NCC - RECEIPTS ACC DD@Council Tax
+TV LICENCE MBP DD@TV Licence
+ZURICH INSURANCE DD@Insurance:Home
+4424 TWEEDMOUTH )))@Food:Groceries
+NORTHUMBRIAN WATER DD@Utilities:Water
+HARVEY W LEMON CTF PP382029B SO@Child:Harvey:Child Trust Fund
+SECUREPAY.MBNA.CO. CHESTER VIS@SCHOOLGATEWA*BERWI BERWICK UPON VIS@Food:School Lunches
+ARDMOOR LTD NORTH BERWICK VIS@Clothing
+ASDA PETROL£UPT442 TWEEDMOUTH VIS@Car:Petrol
+TESCO STORES 6181 BERWICK VIS@Food:Groceries
+Amazon.co.uk*KW7BB AMAZON.CO.UK VIS@Household:Goods
+Amazon Prime*NV5OR amzn.co.uk/pm VIS@Household:Goods
+SPOTIFY LONDON VIS@Internet:Streaming:Spotify
+INT'L 0011478366 DIGITALOCEAN.COM SURREY USD 45.24 @ 1.3464 Visa Rate VIS@Internet:Servers
+Non£Sterling Transaction Fee DR@Fees
+INT'L 0011493627 ETSY ETSY.COM VIS@Household:Goods
+SCHOOLGRID LTD DD@Food:School Lunches
+SCHOOLGRID LTD DD@Food:School Lunches
+B&M 013 £ BERWICK BERWICK£UPON£ )))@Household:Goods
+Amazon.co.uk*O654V AMAZON.CO.UK VIS@Household:Goods
+POST OFFICE COUNTE BERWICK£UPON£ )))@Postage
+LONDIS HIGH FIELD BERWICK£UPON£ )))@Postage
+PLUSNET PLC PAY AC DD@Communication:Mobile
+CARD FACTORY BERWICK )))@Gifts
+WH SMITH BERWICK£O£TWE )))@Household:Goods
+CASTLEGATE PHARMAC BERWICK£UPON£ )))@Prescription
+SAVERS HEALTH & BE BERWICK£UPON£ )))@Pharmaceuticals
+ICELAND BERWICK )))@Food:Groceries
+HOME BARGAINS BERW BERWICK )))@Household:Goods
+PAYPAL *JACKSONSAR 35314369001 VIS@Courses
+PLUSNET PLC PAY AC DD@Communication:Mobile
+WM MORRISONS STORE BERWICK UT VIS@Food:Groceries
+BLYTH SPORTS CENTR BLYTH NE24 VIS@Days Out:Swimming
+THE SWAN CENTRE BERWICK )))@Days Out:Swimming
+4424 TWEEDMOUTH )))@Food:Groceries
+C S ADDISON BERWICK£UPON£ )))@Food:Takeaway
+INT'L 0045543115 DOMESTIKA INC 4159940789 USD 36.48 @ 1.3486 Visa Rate VIS@Learning:Course
+Non£Sterling Transaction Fee DR@Fees
+AMZNMktplace amazon.co.uk VIS@Household:Goods
+STITCH N TIME BERWICK£UPON£ )))@Household:Repairs
+INT'L 0068336439 DOMESTIKA INC 4159940789 USD 20.23 @ 1.3531 Visa Rate VIS@Courses
+Non£Sterling Transaction Fee DR@Fees
+ZURICH INSURANCE DD@Car:Insurance
+ROYAL MAIL GROUP L CHESTERFIELD VIS@Postage
+AMZNFreeTime 353£12477661 VIS@Household:Goods
+NETFLIX.COM 18665797172 VIS@Internet:Streaming:Netflix
+HMRC SELF AS SHIP 6522646472K OBP@Joanna:Tax:National Insurance
+AMZ*Amazon.co.uk AMAZON.CO.UK VIS@Household:Goods
+AMZNMktplace amazon.co.uk VIS@Household:Goods
+NEXT DIRECTORY ONLINE VIS@Clothing
+MARKS&SPENCER PLC INTERNET VIS@Clothing
+TESCO STORES 6181 BERWICK VIS@Food:Groceries
+OLD SCHOOL BE CONON BRIDGE VIS@Clothing
+MARKS&SPENCER PLC BERWICK UPON )))@Food:Groceries
+NIIB T/A NORTHRIDG DD@Car:Repayment
+Amazon.co.uk*CD3F7 AMAZON.CO.UK VIS@Household:Goods
+INT'L 0015820398 BANDCAMP HYPERDUB 402£935£7733 VIS@Internet:Music
+NATIONAL LOTTERY I WATFORD VIS@Lottery
+SAVERS HEALTH & BE BERWICK£UPON£ VIS@Household:Goods
+WH SMITH BERWICK£O£TWE VIS@Household:Goods
+CARD FACTORY BERWICK )))@Gifts
+FAMILY EQUITY PLAN DD@Child:Sophie:Junior ISA
+THE MALTINGS BERWI BERWICK UPON )))@Food:Restaurant
+TESCO STORES 6181 BERWICK VIS@Food:Groceries
+AMZNMktplace amazon.co.uk VIS@Gifts
+THE CROSS INN LTD BERWICK£UPON£ )))@Food:Restaurant
+TESCO STORES 6181 BERWICK )))@Food:Groceries
+Non£Sterling Transaction Fee DR@Fees
+AMZNMktplace amazon.co.uk VIS - mortar and pestle@Household:Goods
+JACKSONSART.COM NE LONDON VIS@Joanna:Art Materials
+BLACKWELL S EDINBURGH )))@Books
+STARBUCKS EDINBURG EDINBURGH )))@Food:Cafe
+PIZZA EXPRESS EDINBURGH 185 )))@Food:Restaurant
+Q PARK OMNI EDINBURGH )))@Car:Parking
+HOME BARGAINS BERW BERWICK )))@Household:Goods
+SAVERS HEALTH & BE BERWICK£UPON£ )))@Household:Goods
+CARD FACTORY BERWICK )))@Gifts
+PNET1056659£3 DD@Internet:Broadband
+AMZNMktplace amazon.co.uk VIS@Computer:Hardware
+WM MORRISONS STORE BERWICK UT )))@Food:Groceries
+WM MORRISONS STORE BERWICK UT )))@Food:Groceries
+WM MORRISONS STORE BERWICK UT )))@Food:Groceries
+WM MORRISONS STORE BERWICK UT )))@Food:Groceries
+SCHOOLGRID LTD DD@Food:School Lunches
+ROYAL LONDON DD@Insurance:Life Assurance
+SANTANDER MORTGAGE DD@Mortgage
+SCOTTISHPOWER DD@Utilities:Electricity & Gas
+NCC £ RECEIPTS ACC DD@Council Tax
+TV LICENCE MBP DD@TV Licence
+NORTHUMBRIAN WATER DD@Utilities:Water
+AMZNMktplace amazon.co.uk VIS@Household:Goods
+PLUSNET PLC PAY AC DD@Communication:Mobile
+HARVEY W LEMON CTF PP382029B SO@Harvey:Child Trust Fund
+INT'L 0098332607 DIGITALOCEAN.COM SURREY USD 45.24 @ 1.3428 Visa Rate VIS@Internet:Servers
+Non£Sterling Transaction Fee DR@Fees
+INT'L 0098347285 ETSY ETSY.COM VIS@Household:Goods
+Amazon Prime*FT5DX amzn.co.uk/pm VIS@Household:Goods
+ZURICH INSURANCE DD@Insurance:Home
+SPOTIFY LONDON VIS@Internet:Streaming:Spotify
+PLUSNET PLC PAY AC DD@Communication:Mobile
+THE WORKS BERWICK UPON )))@Household:Goods
+WM MORRISONS STORE BERWICK UT )))@Food:Groceries
+SAVERS HEALTH & BE BERWICK£UPON£ )))@Pharmaceuticals
+HOME BARGAINS BERW BERWICK )))@Household:Goods
+WM MORRISONS STORE BERWICK UT VIS@Food:Groceries
+ROBERTSONS (BERWIC BERWICK£UPON£ )))@Gifts
+CARD FACTORY BERWICK )))@Gifts
+SAVERS HEALTH & BE BERWICK£UPON£ )))@Pharmaceuticals
+COSTA COFFEE 43037 BERWICK£UPON£ )))@Food:Cafe
+WH SMITH BERWICK£O£TWE )))@Household:Stationery
+PLUSNET PLC PAY AC DD@Communication:Mobile
+GOOGLE *Google Pla g.co/helppay# VIS@Computer:Software
+CANNON FISH RESTAU 01289331480 )))@Food:Restaurant
+NORTHUMBERLAND CC MORPETH VIS@Household:Garden:Refuse
+SECUREPAY.MBNA.CO. CHESTER VIS@WM MORRISONS STORE BERWICK UT )))@Household:Goods
+WM MORRISONS STORE BERWICK UT )))@Food:Groceries
+INT'L 0056350183 Etsy.com £ Damlaro Dublin VIS@Gifts
+INT'L 0056350184 Evernote Zurich VIS@Computer:Software
+ZURICH INSURANCE DD@Car:Insurance
+ASDA PETROL£UPT442 TWEEDMOUTH VIS@Car:Petrol
+NETFLIX.COM 18665797172 VIS@Internet:Streaming:Netflix
+MCDONALDS DUNBAR 1478 )))@Food:Takeaway
+4424 TWEEDMOUTH )))@Food:Groceries
+AMZNFreeTime 353£12477661 VIS@Household:Goods
+TESCO STORES 6181 BERWICK )))@Food:Groceries
+LADY LIBERTINE EDINBURGH )))@Recreation:Pub
+LADY LIBERTINE EDINBURGH )))@Recreation:Pub
+200016 CHQ@School:Trips
+NORTHUMBERLAND CC MORPETH VIS@Car:Parking
+AMZNMktplace amazon.co.uk VIS@Household:Goods
+TAFFYS BERWICK UPON )))@Household:Goods
+NIIB T/A NORTHRIDG DD@Car:Repayment
+MALTINGS BERWICK 01289 330999 VIS@Recreation:Cinema
+WM MORRISONS STORE BERWICK UT VIS@Food:Groceries
+BLYTH SPORTS CENTR BLYTH NE24 VIS@Recreation:Swimming
+ICELAND BERWICK )))@Food:Groceries
+BERWICK DENTAL BERWICK )))@Health:Dentist
+NEXT DIRECTORY ONLINE VIS@Clothing
+HM PASSPORT OFFICE DURHAM VIS@Travel:Travel Documents
+HM PASSPORT OFFICE DURHAM VIS@Travel:Travel Documents
+HM PASSPORT OFFICE DURHAM VIS@Travel:Travel Documents
+TESCO STORES 6181 BERWICK )))@Food:Groceries
+NEXT RETAIL LTD TWEEDMOUTH )))@Clothing
+MAX SPIELMANN LTD BERWICK£UPON£ )))@Travel:Travel Documents
+MAX SPIELMANN LTD BERWICK£UPON£ )))@Travel:Travel Documents
+MAX SPIELMANN LTD BERWICK£UPON£ )))@Travel:Travel Documents
+BRITISH BEEF JERKY MORPETH )))@Food:Cafe
+FAMILY EQUITY PLAN DD@Child:Sophie:Junior ISA
+CARD FACTORY BERWICK )))@Gifts
+SAVERS HEALTH & BE BERWICK£UPON£ )))@Pharmaceuticals
+Amazon.co.uk*2R1UW AMAZON.CO.UK VIS@Household:Goods
+B&M 013 £ BERWICK BERWICK£UPON£ )))@Household:Goods
+INTERFLORA BRITISH SLEAFORD VIS@Gifts
+MARKS&SPENCER PLC BERWICK UPON )))@Food:Groceries
+ROYAL MAIL GROUP L CHESTERFIELD VIS@Postage
+JUMP 360 NEWCASTLE SEAHAM )))@Days Out
+DOBBIES NORTHUMBERLAN )))@Food:Groceries
+JUMP 360 NEWCASTLE SEAHAM )))@Food:Cafe
+CASTLEGATE PHARMAC BERWICK£UPON£ )))@Pharmaceuticals
+TESCO STORES 6181 BERWICK )))@Food:Groceries
+WM MORRISONS STORE BERWICK UT )))@Food:Groceries
+SCHOOLGRID LTD DD@Food:School Lunches
+SCHOOLGRID LTD DD@Food:School Lunches
+ROYAL LONDON DD@Insurance:Life Assurance
+SANTANDER MORTGAGE DD@Mortgage
+SCOTTISHPOWER DD@Utilities:Electricity & Gas
+NCC £ RECEIPTS ACC DD@Council Tax
+TV LICENCE MBP DD@TV Licence
+INT'L 0074110201 DIGITALOCEAN.COM SURREY USD 45.24 @ 1.3301 Visa Rate VIS@Internet:Servers
+Non£Sterling Transaction Fee DR@Fees
+PNET1056659£3 DD@Internet:Broadband
+HARVEY W LEMON CTF PP382029B SO@Harvey:Child Trust Fund
+INT'L 0081147394 ETSY ETSY.COM VIS@Fees
+ETRmytrip_uk_LIFOA ONLINE VIS@Travel:Air Tickets
+Amazon Prime*2R8TX amzn.co.uk/pm VIS@Household:Goods
+PLUSNET PLC PAY AC DD@Communication:Mobile
+ZURICH INSURANCE DD@Insurance:Home
+SPOTIFY LONDON VIS@Internet:Streaming:Spotify
+WM MORRISONS STORE BERWICK UT )))@Food:Groceries
+NEXT DIRECTORY ONLINE VIS@Clothing
+DIRECT PETS BERWICK UPON )))@Household:Goods
+EBBCARRS CAFE EYEMOUTH )))@Food:Cafe
+WM MORRISONS STORE BERWICK UT )))@Food:Groceries
+INT'L 0021606756 RYANAIR @Fees
+Non£Sterling Transaction Fee DR@ANIMAL FRIENDS INS FIRST PAYMENT DD@Insurance:Cat
+ROBERTSONS (BERWIC BERWICK£UPON£ )))@Clothing
+CARD FACTORY BERWICK )))@Gifts
+SAVERS HEALTH & BE BERWICK£UPON£ )))@Pharmaceuticals
+CARD FACTORY BERWICK )))@Gifts
+ICELAND BERWICK )))@Food:Groceries
+HOME BARGAINS BERW BERWICK )))@Household:Goods
+THE WORKS BERWICK UPON )))@Gifts
+PLUSNET PLC PAY AC DD@Communication:Mobile
+CAFFE NERO 304 BER BERWICK UPON )))@Food:Cafe
+MARITIMO LOUNGE SOUTHAMPTON )))@Recreation:Pub
+MARITIMO LOUNGE SOUTHAMPTON )))@Recreation:Pub
+PLUSNET PLC PAY AC DD@Communication:Mobile
+AMZNMktplace amazon.co.uk VIS@Household:Goods
+ZURICH INSURANCE DD@Car:Insurance
+IZ *ASHLEIGH AFFLE AYTON )))@Joanna:Hair
+TESCO PAY AT PUMP BERWICK VIS@Car:Petrol
+NETFLIX.COM 18665797172 VIS@Internet:Streaming:Netflix
+AMZNFreeTime 353£12477661 VIS@Household:Goods
+TESCO STORES 6181 BERWICK )))@Food:Groceries
+WM MORRISONS STORE BERWICK UT )))@Food:Groceries
+INT'L 0048178349 TALK PYTHON TRAINI PDXWEBPROPERT USD 39.00@Learning:Course
+Non£Sterling Transaction Fee DR@Fees
+AMZNMktplace amazon.co.uk VIS@Joanna:Art Materials
+W M MORRISON PETRO@Car:Petrol
+ROYAL MAIL GROUP L CHESTERFIELD VIS@Postage
+CARD FACTORY BERWICK )))@Gifts
+HOME BARGAINS BERW BERWICK )))@Household:Goods
+NIIB T/A NORTHRIDG DD@Car:Repayment
+AMZNMktplace amazon.co.uk VIS@Household:Goods
+SECUREPAY.MBNA.CO. CHESTER VIS@TESCO STORES 6181 BERWICK VIS@Food:Groceries
+ROYAL MAIL GROUP L CHESTERFIELD VIS@Postage
+DVLA DRIVER ONLINE SWANSEA VIS@Car:DVLA
+DEYN S DELI BERWICK£UPON£ )))@Food:Restaurant
+B&M 013 £ BERWICK BERWICK£UPON£ )))@Household:Goods
+FAMILY EQUITY PLAN DD@Child:Sophie:Junior ISA
+ANIMAL FRIENDS INS DD@Insurance:Cat
+TESCO STORES 6181 BERWICK VIS@Food:Groceries
+WM MORRISONS STORE BERWICK UT )))@Food:Groceries
+JOHN SCOTT BAKERY KELSO TD5 )))@Food:Takeaway
+CANNON FISH RESTAU 01289331480 )))@Food:Takeaway
+4424 TWEEDMOUTH )))@Gifts
+SUMUP *THE ALNWIC ALNWICK )))@Food:Takeaway
+WM MORRISONS STORE ALNWICK )))@Food:Groceries
+PNET1056659£3 DD@Internet:Broadband
+NEXT DIRECTORY ONLINE VIS@Clothing
+ICELAND BERWICK VIS@Food:Groceries
+Amazon.co.uk*299UZ AMAZON.CO.UK VIS@Household:Goods
+ICELAND BERWICK )))@Food:Groceries
+HOME BARGAINS BERW BERWICK )))@Household:Goods
+PLUSNET PLC PAY AC DD@Communication:Mobile
+SCHOOLGRID LTD DD@Food:School Lunches
+SCHOOLGRID LTD DD@Food:School Lunches
+ROYAL LONDON DD@Insurance:Life Assurance
+SANTANDER MORTGAGE DD@Mortgage
+SCOTTISHPOWER DD@Utilities:Electricity & Gas
+NCC £ RECEIPTS ACC DD@Council Tax
+TV LICENCE MBP DD@TV Licence
+ZURICH INSURANCE DD@Insurance:Home
+HARVEY W LEMON CTF PP382029B SO@Harvey:Child Trust Fund
+MARKS&SPENCER PLC INTERNET VIS@Food:Groceries
+WWW.HXPAYMENTS.COM HYTHE VIS@Car:Parking
+AMZNMktplace amazon.co.uk VIS@Household:Goods
+Amazon Prime*299RX amzn.co.uk/pm VIS@Household:Goods
+SPOTIFY LONDON VIS@Internet:Streaming:Spotify
+WM MORRISONS STORE BERWICK UT )))@Food:Groceries
+ALDI 22 777 BERWICK UPON )))@Food:Groceries
+4424 TWEEDMOUTH )))@Food:Groceries
+INT'L 0090716483 DIGITALOCEAN.COM SURREY USD 43.84 @ 1.3082 Visa Rate VIS@Internet:Servers
+Non£Sterling Transaction Fee DR@Fees
+INT'L 0090732960 ETSY ETSY.COM VIS@Household:Goods
+AMZN Digital*29922 353£12477661 VIS@Books
+MARKS&SPENCER PLC BERWICK UPON )))@Food:Groceries
+MALTINGS BERWICK 01289 330999 VIS@Recreation:Theatre
+PLUSNET PLC PAY AC DD@Communication:Mobile
+SAVERS HEALTH & BE BERWICK£UPON£ )))@Household:Goods
+CARD FACTORY BERWICK )))@Gifts
+THE MALTINGS BERWI BERWICK UPON )))@Food:Restaurant
+HOME BARGAINS BERW BERWICK )))@Household:Goods
+SAVERS HEALTH & BE BERWICK£UPON£ )))@Household:Goods
+PLUSNET PLC PAY AC DD@Communication:Mobile
+CARD FACTORY BERWICK )))@Gifts
+HOME BARGAINS BERW BERWICK )))@Household:Goods
+WM MORRISONS STORE BERWICK UT )))@Food:Groceries
+W M MORRISON PETRO BERWICK UPON )))@Car:Petrol
+J D WETHERSPOON PL WATFORD VIS@Food:Restaurant
+INT'L 0052581930 TESCO STORES 3560 ROSCOMMON EUR 5.79 @ 1.1962 Visa Rate )))@Food:Groceries
+Non£Sterling Transaction Fee DR@Fees
+INT'L 0052581931 LIDL IRELAND LTD BALLINA EUR 19.78 @ 1.1958 Visa Rate )))@Food:Groceries
+Non£Sterling Transaction Fee DR@Fees
+INT'L 0038193561 RYANAIR U7YJGI PAYPAL COM VIS@Travel:Air Tickets
+INT'L 0038193562 RYANAIR ZIEM6R PAYPAL COM VIS@Travel:Air Tickets
+INT'L 0059209427 Cormican School & Roscommon EUR 5.99 @ 1.1956 Visa Rate )))@Joanna:Art Materials
+Non£Sterling Transaction Fee DR@Fees
+INT'L 0059209426 STEAM PURCHASE SEATTLE VIS@Gifts
+ZURICH INSURANCE DD@Car:Insurance
+NETFLIX.COM 18665797172 VIS@Internet:Streaming:Netflix
+SHELL NORTH ROAD BERWICK ON TW )))@Food:Groceries
+INT'L 0065801698 SSP IRELAND LTD DUBLIN EUR 32.45 @ 1.1921 Visa Rate )))@Food:Restaurant
+Non£Sterling Transaction Fee DR@Fees
+INT'L 0065801699 WH SMITH DUBLIN AIRPOR EUR 2.90 @ 1.1934 Visa Rate )))@Food:Groceries
+Non£Sterling Transaction Fee DR@Fees
+INT'L 0065801700 APPLEGREEN FRENCHP FRENCHPARK EUR 41.82 @ 1.1958 Visa Rate )))@Car:Petrol
+Non£Sterling Transaction Fee DR@Fees
+AMZNFreeTime 353£12477661 VIS@Household:Goods
+FAREWILL.COM LONDON VIS@Legal:Will
+WM MORRISONS STORE BERWICK UT )))@Food:Groceries
+ALDI 22 777 BERWICK UPON )))@Food:Groceries
+NIIB T/A NORTHRIDG DD@Car:Repayment
+TESCO STORES 6181 BERWICK )))@Food:Groceries
+The Homestead Cafe Coldstream )))@Food:Cafe
+HWLB AMZN Digital*2E8XL 353£12477661 VIS@Books
+Amazon.co.uk*2E0FH AMAZON.CO.UK VIS@Household:Goods
+IZ *THE LOOKOUT BE BERWICK ON TW )))@Food:Cafe
+WM MORRISONS STORE BERWICK UT )))@Food:Groceries
+Plusnet monthly payment@Communication:Mobile
+Argos - Harvey new bed@Household:Furniture
+Mark Clegg - Harvey bedroom@Household:Decorating
+Homebase@Household:Decorating
+Tesco weekly shop@Food:Groceries
+Homebase - rubble sacks@Household:Decorating
+Morrisons - food for lunch@Food:Groceries
+Plusnet mobile@Communication:Mobile
+Berwick Decorating Centre@Household:Decorating
+M&S Lunch on Friday@Food:Groceries
+Homebase@Household:Goods
+Amazon something@Household:Stationery
+Next Clothing (jumper?)@Clothing
+Zurich insurance@Car:Insurance
+Foulis chippy@Food:Takeaway
+Nextflix@Internet:Streaming:Netflix
+Stitch in time sewing shop@Household:Repairs
+Glendale paints@Household:Decorating
+Card Factory@Gifts
+Savers pharma@Household:Pharmaceuticals
+B&M stuff@Household:Goods
+Post Office - Leslie present@Postage
+Next - Sophie dress@Clothing
+Castlegate Pharmacy@Prescription
+Amazon something@Household:Goods
+Next - Jo jumper@Clothing
+Royal Mail@Postage
+Morrisons - food for lunch@Food:Groceries
+House of Illustration Jo course@Learning:Course
+Northridge Finance Car@Car:Repayment
+Asda@Food:Groceries
+Homebase something@Household:Goods
+Morrisons food@Food:Groceries
+Swan Centre Swimming@Days Out:Swimming
+Homebase polythene sheeting@Household:Goods
+Etsy something@Household:Goods
+Amazon something@Household:Goods
+Fastmail@Internet:Email
+Transaction Fee@Fees
+Amazon something@Household:Goods
+Family Equity Plan@Child:Sophie:Junior ISA
+Cash and Carry Carpets@Household:Furniture
+Boden@Clothing
+Amazon something@Household:Goods
+The Maltings Lunch@Food:Restaurant
+Royal Mail@Postage
+Morrisons@Food:Groceries
+Pizza Express The Fort@Food:Restaurant
+Amazon kids stuff TBC@Household:Goods
+Odeon Cinemas@Recreation:Cinema
+C S Addison Chippy@Food:Takeaway
+Hobbycraft@Joanna:Art Materials
+Odeon food@Food:Takeaway
+Odeon food again@Food:Takeaway
+Morrisons petrol@Car:Petrol
+Blyth Sports Centre Swimming@Recreation:Swimming
+Amazon something@Recreation:Swimming
+Amazon something@Household:Goods
+Joanna Hair-do@Joanna:Hair
+Savers@Household:Goods
+B&M something@Household:Goods
+Home bargains@Household:Goods
+Card factory@Gifts
+M&S food bits@Food:Groceries
+Plusnet broadband@Internet:Broadband
+School grid@Food:School Lunches
+School grid@Food:School Lunches
+Royal London Life Assurance@Insurance:Life Assurance
+Santander Morgage@Mortgage
+Scottish Power@Utilities:Electricity & Gas
+Council Tax@Council Tax
+TV License@TV Licence
+Water@Utilities:Water
+LNER - to Murrayfield@Travel:Rail Tickets
+Harvey bedside table Amazon@Household:Furniture
+Amrans curry@Food:Takeaway
+Aldi food@Food:Groceries
+B&M something@Household:Goods
+Morrisons food@Food:Groceries
+Home bargains@Household:Goods
+Plusnet mobile@Communication:Mobile
+Harvey Child Trust Fund@Child:Harvey:Child Trust Fund
+Next - my trousers@Clothing
+Next - Sophie tights@Clothing
+Ardmoor Boots@Clothing
+Digital Ocean@Internet:Servers
+Fees@Fees
+Google Play store - calendar app@Communication:Mobile:Apps
+Amazon something@Household:Goods
+Passport photos@Passport
+Zurich House Insurance @Insurance:Home
+NEXT DIRECTORY@Clothing
+Spotify@Internet:Streaming:Spotify
+M&S@Food:Groceries
+Plusnet mobile@Communication:Mobile
+B&M something@Household:Goods
+Google Play Store Conversations App@Communication:Mobile:Apps
+Google Play Store Conversations App@Communication:Mobile:Apps
+Google Play Store Conversations App@Communication:Mobile:Apps
+The Maltings Lunch@Food:Restaurant
+Greggs@Food:Takeaway
+John Scott Bakery Kelso@Food:Takeaway
+Sainsburys@Food:Groceries
+Morrisons food@Food:Groceries
+Amazon something@Household:Goods
+Aldi food@Food:Groceries
+Fox Den Drinks Bristol@Recreation:Pub
+Hover domain for XMPP server@Internet:Domains
+Transaction Fee@Fees
+Plusnet mobile@Communication:Mobile
+Cafe Nero Edinburgh@Food:Cafe
+Za Za Bazaar Bristol@Recreation:Pub
+Zurich car insurance@Car:Insurance
+Morrisons food@Food:Groceries
+Tesco weekly shop@Food:Groceries
+Nextflix@Internet:Streaming:Netflix
+Savers@Household:Goods
+B&M something@Household:Goods
+M&Co Harvey Pants@Clothing
+Costa Coffee@Food:Cafe
+Costa Coffee@Food:Cafe
+Greggs@Food:Takeaway
+Boots the Chemist@Pharmaceuticals
+Murrayfield Drink Tent@Recreation:Pub
+Sainsburys@Food:Groceries
+Home Bargains@Household:Goods
+WH Smith@Household:Stationery
+Scotsmans Lounge Edinburgh@Recreation:Pub
+White Heart Edinburgh@Recreation:Pub
+HMI Market Street Cafe Edinburgh@Food:Cafe
+Amazon Digital@Household:Goods
+Amazon@Household:Goods
+Savers@Household:Goods
+The Works@Household:Goods
+B&M something@Household:Goods
+Home Bargains@Household:Goods
+The Dolphin Plymouth@Recreation:Pub
+Burger King Edinburgh Aiport@Food:Takeaway
+Sainsburys@Food:Groceries
+Northridge Finance Car@Car:Repayment
+The Furness Railway Barrow@Recreation:Pub
+Card factory@Gifts
+WH Smith@Household:Stationery
+The Mule on Rouge Berwick@Food:Cafe
+The Works@Household:Goods
+INT'L 0026634567 ETSY ETSY.COM VIS@Gifts
+INT'L 0026634566 ETSY ETSY.COM VIS@Gifts
+Non-Sterling Transaction Fee DR@Fees
+INT'L 0019087339 Fastmail Pty Ltd Melbourne USD 6.00 @ 1.3392 Visa Rate VIS@Internet:Email
+G C GRIEVE BERWICK UPON )))@Household:Stationery
+G C GRIEVE BERWICK UPON )))@Household:Stationery
+TESCO STORES 6181 BERWICK VIS@Food:Groceries
+PAYPAL *WHITE STUF 35314369001 VIS@Gifts
+HOME BARGAINS BERW BERWICK )))@Household:Goods
+COSTA COFFEE 43037 BERWICK-UPON- )))@Food:Cafe
+THE WORKS BERWICK UPON )))@Household:Goods
+WH SMITH BERWICK-O-TWE )))@Household:Goods
+ROBERTSONS BERWICK-UPON- )))@Clothing
+Amazon.co.uk*LU1I5 AMAZON.CO.UK VIS@Gifts
+SECUREPAY.MBNA.CO. CHESTER VIS@FAMILY EQUITY PLAN DD@Child:Sophie:Junior ISA
+NEXT DIRECTORY ONLINE VIS@Clothing
+AMZNMktplace amazon.co.uk VIS@Gifts
+AMZNMktplace amazon.co.uk VIS@Gifts
+BLUE LIGHT CARD LEICESTER VIS@Household:Goods
+WM MORRISONS STORE BERWICK UT VIS@Food:Groceries
+AMZNMktplace amazon.co.uk VIS@Gifts
+TESCO STORES 6181 BERWICK VIS@Food:Groceries
+Microsoft*Xbox Reading VIS@Computer:Software:Games
+NEXT RETAIL LTD TWEEDMOUTH )))@Clothing
+4424 TWEEDMOUTH )))@Food:Groceries
+ROYAL MAIL GROUP L CHESTERFIELD VIS@Postage
+Microsoft*Xbox Reading VIS@Computer:Software:Games
+COSTA COFFEE 43037 BERWICK-UPON- )))@Food:Cafe
+SumUp *Stephens B Dunfermline )))@Food:Takeaway
+THE WORKS BERWICK UPON )))@Household:Goods
+PNET1056659-3 DD@Internet:Broadband
+Non-Sterling Transaction Fee DR@Fees
+INT'L 0097482518 DIGITALOCEAN.COM SURREY USD 43.25 @ 1.3194 Visa Rate VIS@Internet:Servers
+ROYAL MAIL GROUP L CHESTERFIELD VIS@Postage
+HM PASSPORT OFFICE DURHAM VIS@Passport
+GOOGLE Google Pla London VIS@Communication:Mobile:Apps
+NORTHUMBRIAN WATER DD@Utilities:Water
+TV LICENCE MBP DD@TV Licence
+NCC - RECEIPTS ACC DD@Council Tax
+SANTANDER MORTGAGE DD@Mortgage
+ROYAL LONDON DD@Car:Insurance
+SCHOOLGRID LTD DD@Food:School Lunches
+SCHOOLGRID LTD DD@Food:School Lunches
+COSTA COFFEE 43037 BERWICK-UPON- )))@Food:Cafe
+SAVERS HEALTH & BE BERWICK-UPON- )))@Household:Goods
+BOOTS/0692 BERWICK UPON )))@Household:Goods
+BOOTS/0692 BERWICK UPON )))@Household:Goods
+ICELAND BERWICK )))@Food:Groceries
+HARVEY W LEMON CTF PP382029B SO@Child:Harvey:Child Trust Fund
+SCOTTISHPOWER DD@Utilities:Electricity & Gas
+PAYPAL *EBAY UK 35314369001 VIS@Gifts
+PAYPAL *EBAY UK 35314369001 VIS@Gifts
+PAYPAL *EBAY UK 35314369001 VIS@Gifts
+PAYPAL *EBAY UK 35314369001 VIS@Gifts
+Amazon Prime*FZ73U amzn.co.uk/pm VIS@Gifts
+HOMEBASE.CO.UK 03450778888 VIS@Household:Furniture
+MARKS&SPENCER PLC INTERNET VIS@Household:Goods
+PLUSNET PLC PAY AC DD@Communication:Mobile
+Non-Sterling Transaction Fee DR@Fees
+INT'L 0027078252 PROTONMAIL GENEVA EUR 48.00 @ 1.1690 Visa Rate VIS@Internet:Email
+4424 TWEEDMOUTH )))@Food:Groceries
+AMZNMktplace amazon.co.uk VIS@Gifts
+ROYAL MAIL GROUP L CHESTERFIELD VIS@Postage
+ROYAL MAIL GROUP L CHESTERFIELD VIS@Postage
+Joules Limited Market Harbor VIS@Clothing
+EBAY COMMERCE UK L LONDON VIS@Gifts
+AMZNMktplace amazon.co.uk VIS@Gifts
+AMZNMktplace amazon.co.uk VIS@Gifts
+TESCO STORES 6181 BERWICK VIS@Food:Groceries
+ROYAL MAIL GROUP L CHESTERFIELD VIS@Postage
+BERWICK GARDEN CEN BERWICK-UPON- VIS@Gifts
+SPOTIFY LONDON VIS@Internet:Streaming:Spotify
+AMZNMktplace amazon.co.uk VIS@Gifts
+INT'L 0041993653 EB *ONLINE TALK AN 801-413-7200 VIS@Courses
+Non-Sterling Transaction Fee DR@Fees
+INT'L 0041979037 BITWARDEN HTTPSBITWARDE USD 10.00 @ 1.3210 Visa Rate VIS@Computer:Software
+THE WORKS BERWICK UPON )))@Gifts
+THE WORKS BERWICK UPON )))@Gifts
+WH SMITH BERWICK-O-TWE )))@Gifts
+GOOD SHIP ILLO BERWICK UPON VIS@Courses
+AMZNMktplace amazon.co.uk VIS@Gifts
+AMZNMktplace amazon.co.uk VIS@Gifts
+AMZ*CCL Computers customerservi VIS@Computer:Hardware
+WHITE STUFF LTD INTERNET VIS@Gifts
+Amazon.co.uk*TN1QP AMAZON.CO.UK VIS@Gifts
+PLUSNET PLC PAY AC DD@Communication:Mobile
+Amazon.co.uk*S621S AMAZON.CO.UK VIS@Gifts
+Joules Limited Market Harbor VIS@Gifts
+PLUSNET PLC PAY AC DD@Communication:Mobile
+CAFFE NERO 304 BER BERWICK UPON )))@Food:Cafe
+B&M 013 - BERWICK BERWICK-UPON- )))@Household:Goods
+MARKS&SPENCER PLC BERWICK UPON )))@Food:Groceries
+NETFLIX.COM 18665797172 VIS@Internet:Streaming:Netflix
+WM MORRISONS STORE BERWICK UT VIS@Food:Groceries
+ROYAL MAIL GROUP L CHESTERFIELD VIS@Postage
+THE CROSS INN LTD BERWICK-UPON- VIS@Food:Restaurant
+THE WORKS BERWICK UPON )))@Gifts
+HOME BARGAINS BERW BERWICK )))@Household:Goods
+B&M 013 - BERWICK BERWICK-UPON- )))@Household:Goods
+ICELAND BERWICK )))@Food:Groceries
+SAVERS HEALTH & BE BERWICK-UPON- )))@Household:Goods
+CARD FACTORY BERWICK )))@Gifts
+WH SMITH BERWICK-O-TWE )))@Gifts
+ICELAND BERWICK )))@Food:Groceries
+WH SMITH BERWICK-O-TWE )))@Gifts
+CARD FACTORY BERWICK )))@Gifts
+ZURICH INSURANCE DD@Car:Insurance
+AMZNFreeTime 353-12477661 VIS@Gifts
+PAYPAL *NORTH ZOO 35314369001 VIS@Gifts
+CARD FACTORY BERWICK )))@Gifts
+ICELAND BERWICK )))@Food:Groceries
+BOOTS/0692 BERWICK UPON )))@Household:Pharmaceuticals
+NEXT DIRECTORY ONLINE VIS@Clothing
+Amazon.co.uk*TE0R3 AMAZON.CO.UK VIS@Gifts
+ZURICH INSURANCE FIRST PAYMENT DD@Insurance:Home
+Joules pyjamas@Gifts
+AMZNMktplace amazon.co.uk VIS@Gifts
+Morrisons shop@Food:Groceries
+NIIB T/A NORTHRIDG DD@Car:Repayment
+Castlegate Pharmacy Presecription@Prescription
+ROYAL MAIL GROUP L CHESTERFIELD VIS@Postage
+ROYAL MAIL GROUP L CHESTERFIELD VIS@Postage
+ROYAL MAIL GROUP L CHESTERFIELD VIS@Postage
+ROYAL MAIL GROUP L CHESTERFIELD VIS@Postage
+ROYAL MAIL GROUP L CHESTERFIELD VIS@Postage
+FAMILY EQUITY PLAN DD@Child:Sophie:Junior ISA
+IZ *ASHLEIGH AFFLE AYTON )))@Joanna:Hair
+BOOTS/0692 BERWICK UPON )))@Household:Goods
+HOME BARGAINS BERW BERWICK )))@Household:Goods
+Non-Sterling Transaction Fee DR@Fees
+INT'L 0057713324 DOMESTIKA INC 4159940789 USD 19.93 @ 1.3198 Visa Rate VIS@Courses
+Morrisons Christmas Shop@Food:Groceries
+Amazon.co.uk*08979 AMAZON.CO.UK VIS@Gifts
+GOOGLE Google Pla London VIS@Communication:Mobile:Apps
+Joules Limited Market Harbor VIS@Clothing
+NEXT DIRECTORY ONLINE VIS@Clothing
+Amazon.co.uk*QO78D AMAZON.CO.UK VIS@Household:Goods
+ODEON CINEMAS LONDON VIS@Days Out:Cinema
+SHELL NORTH ROAD BERWICK ON TW )))@Car:Petrol
+NEXT DIRECTORY ONLINE VIS@Clothing
+AMZNMktplace amazon.co.uk VIS@Household:Goods
+Amazon.co.uk*9W7J6 AMAZON.CO.UK VIS@Books
+HOBBYCRAFT EDINBURGH )))@Joanna:Art Materials
+ODEON FORT KINNAIRD )))@Food:Takeaway
+PIZZA HUT BOREHAMWOOD VIS@Food:Restaurant
+TESCO STORES 6181@Food:Groceries
+THE QUEENS HEAD HOTEL@Food:Restaurant
+EURORESCUE ROMFORD VIS@Car:Breakdown
+PLUSNET PLC PAY AC DD@Communication:Mobile
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" };
}