reckon 0.4.4 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.ruby-version +1 -1
- data/.travis.yml +10 -2
- data/CHANGELOG.md +197 -0
- data/Gemfile +0 -1
- data/Gemfile.lock +33 -15
- data/README.md +2 -5
- data/lib/reckon.rb +10 -8
- data/lib/reckon/app.rb +92 -116
- data/lib/reckon/cosine_similarity.rb +119 -0
- data/lib/reckon/csv_parser.rb +57 -27
- data/lib/reckon/ledger_parser.rb +194 -30
- data/lib/reckon/money.rb +3 -4
- data/reckon.gemspec +6 -5
- data/spec/data_fixtures/73-sample.csv +2 -0
- data/spec/data_fixtures/73-tokens.yml +8 -0
- data/spec/data_fixtures/73-transactions.ledger +7 -0
- data/spec/data_fixtures/austrian_example.csv +13 -0
- data/spec/data_fixtures/bom_utf8_file.csv +1 -0
- data/spec/data_fixtures/broker_canada_example.csv +12 -0
- data/spec/data_fixtures/chase.csv +9 -0
- data/spec/data_fixtures/danish_kroner_nordea_example.csv +6 -0
- data/spec/data_fixtures/english_date_example.csv +3 -0
- data/spec/data_fixtures/french_example.csv +9 -0
- data/spec/data_fixtures/german_date_example.csv +3 -0
- data/spec/data_fixtures/harder_date_example.csv +5 -0
- data/spec/data_fixtures/ing.csv +3 -0
- data/spec/data_fixtures/intuit_mint_example.csv +7 -0
- data/spec/data_fixtures/invalid_header_example.csv +6 -0
- data/spec/data_fixtures/inversed_credit_card.csv +16 -0
- data/spec/data_fixtures/nationwide.csv +4 -0
- data/spec/data_fixtures/simple.csv +2 -0
- data/spec/data_fixtures/some_other.csv +9 -0
- data/spec/data_fixtures/spanish_date_example.csv +3 -0
- data/spec/data_fixtures/suntrust.csv +7 -0
- data/spec/data_fixtures/two_money_columns.csv +5 -0
- data/spec/data_fixtures/yyyymmdd_date_example.csv +1 -0
- data/spec/reckon/app_spec.rb +66 -34
- data/spec/reckon/csv_parser_spec.rb +79 -201
- data/spec/reckon/ledger_parser_spec.rb +62 -9
- data/spec/spec_helper.rb +3 -0
- metadata +62 -19
- data/CHANGES.md +0 -9
data/lib/reckon/money.rb
CHANGED
@@ -55,9 +55,9 @@ module Reckon
|
|
55
55
|
any_number_regex = /^(.*?)([\d\.]+)/
|
56
56
|
|
57
57
|
# Prefer matching the money_format, match any number otherwise
|
58
|
-
m = value.match( money_format_regex ) ||
|
58
|
+
m = value.match( money_format_regex ) ||
|
59
59
|
value.match( any_number_regex )
|
60
|
-
if m
|
60
|
+
if m
|
61
61
|
amount = m[2].to_f
|
62
62
|
# Check whether the money had a - or (, which indicates negative amounts
|
63
63
|
if (m[1].match( /^[\(-]/ ) || m[1].match( /-$/ ))
|
@@ -164,9 +164,8 @@ module Reckon
|
|
164
164
|
end
|
165
165
|
|
166
166
|
def pretty_for(index)
|
167
|
-
self.for(index).
|
167
|
+
self.for(index).to_date.iso8601
|
168
168
|
end
|
169
169
|
|
170
170
|
end
|
171
171
|
end
|
172
|
-
|
data/reckon.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
require 'reckon/version'
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = %q{reckon}
|
6
|
-
s.version =
|
7
|
-
s.authors = ["Andrew Cantino", "BlackEdder"]
|
6
|
+
s.version = Reckon::VERSION
|
7
|
+
s.authors = ["Andrew Cantino", "BlackEdder", "Ben Prew"]
|
8
8
|
s.email = %q{andrew@iterationlabs.com}
|
9
9
|
s.homepage = %q{https://github.com/cantino/reckon}
|
10
10
|
s.description = %q{Reckon automagically converts CSV files for use with the command-line accounting tool Ledger. It also helps you to select the correct accounts associated with the CSV data using Bayesian machine learning.}
|
@@ -16,9 +16,10 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
|
18
18
|
s.add_development_dependency "rspec", ">= 1.2.9"
|
19
|
-
s.
|
19
|
+
s.add_development_dependency "pry", ">= 0.12.2"
|
20
|
+
s.add_development_dependency "rantly", "= 1.2.0"
|
20
21
|
s.add_runtime_dependency "chronic", ">= 0.3.0"
|
21
22
|
s.add_runtime_dependency "highline", ">= 1.5.2"
|
22
23
|
s.add_runtime_dependency "terminal-table", ">= 1.4.2"
|
24
|
+
s.add_runtime_dependency "rchardet", ">= 1.8.0"
|
23
25
|
end
|
24
|
-
|
@@ -0,0 +1,13 @@
|
|
1
|
+
00075757575;Abbuchung Onlinebanking 654321098765 BG/000002462 BICBICBI AT654000000065432109 Thematische Universität Stadt ;22.01.2014;22.01.2014;-18,00;EUR
|
2
|
+
00075757575;333222111333222 222111333222 OG/000002461 BICBICBIXXX AT333000000003332221 Telekom Land AG RECHNUNG 11/13 333222111333222 ;17.01.2014;17.01.2014;-9,05;EUR
|
3
|
+
00075757575;Helm BG/000002460 10000 00007878787 Muster Dr.Beispiel-Vorname ;15.01.2014;15.01.2014;+120,00;EUR
|
4
|
+
00075757575;Gutschrift Dauerauftrag BG/000002459 BICBICBI AT787000000007878787 Muster Dr.Beispiel-Vorname ;15.01.2014;15.01.2014;+22,00;EUR
|
5
|
+
00075757575;Bezahlung Bankomat MC/000002458 0001 K1 06.01.UM 18.11 Bahn 8020 FSA\\Ort\10 10 2002200EUR ;07.01.2014;06.01.2014;-37,60;EUR
|
6
|
+
00075757575;Bezahlung Bankomat 10.33 MC/000002457 0001 K1 02.01.UM 10.33 Abcdef Electronic\\Wie n\1150 0400444 ;03.01.2014;02.01.2014;-46,42;EUR
|
7
|
+
00075757575;050055556666000 OG/000002456 BKAUATWWXXX AT555500000555566665 JKL Telekommm Stadt GmbH JKL Rechnung 555666555 ;03.01.2014;03.01.2014;-17,15;EUR
|
8
|
+
00075757575;Abbuchung Einzugsermächtigung OG/000002455 INTERNATIONALER AUTOMOBIL-, 10000 00006655665 ;02.01.2014;02.01.2014;-17,40;EUR
|
9
|
+
00075757575;POLIZZE 1/01/0101010 Fondsge010101010101nsverOG/000002454 BICBICBIXXX AT101000000101010101 VERSICHERUNG NAMEDERV AG POLIZZE 1/01/0101010 Fondsgebundene Lebensversicherung - fällig 01.01. 2014 Folg eprämie ;02.01.2014;02.01.2014;-31,71;EUR
|
10
|
+
00075757575;POLIZZE 1/01/0101012 Rentenv010101010102- fälOG/000002453 BICBICBIXXX AT101000000101010102 VERSICHERUNG NAMEDERV AG POLIZZE 1/01/0101012 Rentenversicherung - fällig 01.01.20 14 Folgeprämi e ;02.01.2014;02.01.2014;-32,45;EUR
|
11
|
+
00075757575;Anlass VD/000002452 BKAUATWWBRN AT808800080880880880 Dipl.Ing.Dr. Berta Beispiel ;02.01.2014;02.01.2014;+61,90;EUR
|
12
|
+
00075757575;Abbuchung Onlinebanking 000009999999 BG/000002451 BICBICBI AT099000000009999999 Asdfjklöasdf Asdfjklöasdfjklöasdf ;02.01.2014;02.01.2014;-104,69;EUR
|
13
|
+
00075757575;Abbuchung Onlinebanking FE/000002450 AT556600055665566556 CD Stadt Efghij Club Dipl.Ing. Max Muster M005566 - Mitgliedsbeitrag 2014 ;02.01.2014;02.01.2014;-39,00;EUR
|
@@ -0,0 +1 @@
|
|
1
|
+
"Date","Time","TimeZone","Name","Type","Status","Currency","Gross","Fee","Net","From Email Address","To Email Address","Transaction ID","Shipping Address","Address Status","Item Title","Item ID","Shipping and Handling Amount","Insurance Amount","Sales Tax","Option 1 Name","Option 1 Value","Option 2 Name","Option 2 Value","Reference Txn ID","Invoice Number","Custom Number","Quantity","Receipt ID","Balance","Address Line 1","Address Line 2/District/Neighborhood","Town/City","State/Province/Region/County/Territory/Prefecture/Republic","Zip/Postal Code","Country","Contact Phone Number","Subject","Note","Country Code","Balance Impact"
|
@@ -0,0 +1,12 @@
|
|
1
|
+
2014-02-10,2014-02-10,Interest,ISHARES S&P/TSX CAPPED REIT IN,XRE,179,,,12.55,CAD
|
2
|
+
2014-01-16,2014-01-16,Reinvestment,ISHARES GLOBAL AGRICULTURE IND,COW,3,,,-81.57,CAD
|
3
|
+
2014-01-16,2014-01-16,Contribution,CONTRIBUTION,,,,,600.00,CAD
|
4
|
+
2014-01-16,2014-01-16,Interest,ISHARES GLOBAL AGRICULTURE IND,COW,200,,,87.05,CAD
|
5
|
+
2014-01-14,2014-01-14,Reinvestment,BMO NASDAQ 100 EQTY HEDGED TO,ZQQ,2,,,-54.72,CAD
|
6
|
+
2014-01-07,2014-01-10,Sell,BMO NASDAQ 100 EQTY HEDGED TO,ZQQ,-300,27.44,CDN,8222.05,CAD
|
7
|
+
2014-01-07,2014-01-07,Interest,BMO S&P/TSX EQUAL WEIGHT BKS I,ZEB,250,,,14.00,CAD
|
8
|
+
2013-07-02,2013-07-02,Dividend,SELECT SECTOR SPDR FD SHS BEN,XLB,130,,,38.70,USD
|
9
|
+
2013-06-27,2013-06-27,Dividend,ICICI BK SPONSORED ADR,IBN,100,,,66.70,USD
|
10
|
+
2013-06-19,2013-06-24,Buy,ISHARES S&P/TSX CAPPED REIT IN,XRE,300,15.90,CDN,-4779.95,CAD
|
11
|
+
2013-06-17,2013-06-17,Contribution,CONTRIBUTION,,,,,600.00,CAD
|
12
|
+
2013-05-22,2013-05-22,Dividend,NATBK,NA,70,,,58.10,CAD
|
@@ -0,0 +1,9 @@
|
|
1
|
+
DEBIT,20091224120000[0:GMT],"HOST 037196321563 MO 12/22SLICEHOST",-85.00
|
2
|
+
CHECK,20091224120000[0:GMT],"CHECK 2656",-20.00
|
3
|
+
DEBIT,20091224120000[0:GMT],"GITHUB 041287430274 CA 12/22GITHUB 04",-7.00
|
4
|
+
CREDIT,20091223120000[0:GMT],"Some Company vendorpymt PPD ID: 59728JSL20",3520.00
|
5
|
+
CREDIT,20091223120000[0:GMT],"Blarg BLARG REVENUE PPD ID: 00jah78563",1558.52
|
6
|
+
DEBIT,20091221120000[0:GMT],"WEBSITE-BALANCE-17DEC09 12 12/17WEBSITE-BAL",-12.23
|
7
|
+
DEBIT,20091214120000[0:GMT],"WEBSITE-BALANCE-10DEC09 12 12/10WEBSITE-BAL",-20.96
|
8
|
+
CREDIT,20091211120000[0:GMT],"PAYPAL TRANSFER PPD ID: PAYPALSDSL",-116.22
|
9
|
+
CREDIT,20091210120000[0:GMT],"Some Company vendorpymt PPD ID: 5KL3832735",2105.00
|
@@ -0,0 +1,6 @@
|
|
1
|
+
16-11-2012;Dankort-nota DSB Kobenhavn 15149;16-11-2012;-48,00;26550,33
|
2
|
+
26-10-2012;Dankort-nota Ziggy Cafe 19471;26-10-2012;-79,00;26054,54
|
3
|
+
22-10-2012;Dankort-nota H&M Hennes & M 10681;23-10-2012;497,90;25433,54
|
4
|
+
12-10-2012;Visa kob DKK 995,00 WWW.ASOS.COM 00000 ;12-10-2012;-995,00;27939,54
|
5
|
+
12-09-2012;Dankort-nota B.J. TRADING E 14660;12-09-2012;-3452,90;26164,80
|
6
|
+
27-08-2012;Dankort-nota MATAS - 20319 18230;27-08-2012;-655,00;21127,45
|
@@ -0,0 +1,9 @@
|
|
1
|
+
01234567890;22/01/2014;CHEQUE 012345678901234578ABC000 0000 4381974748378178473744441;0000037;-10,00;
|
2
|
+
01234567890;22/01/2014;CHEQUE 012345678901937845500TS1 0000 7439816947047874387438445;0000038;-5,76;
|
3
|
+
01234567890;22/01/2014;CARTE 012345 CB:*0123456 XX XXXXXX XXX 33BORDEAUX;00X0X0X;-105,90;
|
4
|
+
01234567890;22/01/2014;CARTE 012345 CB:*0123456 XXXXXXXXXXX 33SAINT ANDRE D;00X0X0X;-39,99;
|
5
|
+
01234567890;22/01/2014;CARTE 012345 CB:*0123456 XXXXXXX XXXXX 33BORDEAUX;10X9X6X;-36,00;
|
6
|
+
01234567890;22/01/2014;PRLV XXXXXXXX ABONNEMENT XXXXXXXXXXXXXX.NET N.EMETTEUR: 324411;0XX0XXX;-40,00;
|
7
|
+
01234567890;21/01/2014;CARTE 012345 CB:*0123456 XXXXX XX33433ST ANDRE DE C;0POBUES;-47,12;
|
8
|
+
01234567890;21/01/2014;CARTE 012345 CB:*0123456 XXXXXXXXXXXX33433ST ANDRE DE C;0POBUER;-27,02;
|
9
|
+
01234567890;21/01/2014;CARTE 012345 CB:*0123456 XXXXXX XXXXXXXX33ST ANDRE 935/;0POBUEQ;-25,65;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
10-Nov-9,-123.12,,,TRANSFER DEBIT INTERNET TRANSFER,INTERNET TRANSFER MORTGAGE,0.00,
|
2
|
+
09-Nov-10,123.12,,,SALARY SALARY,NGHSKS46383BGDJKD FOO BAR,432.12,
|
3
|
+
04-Nov-11,-1234.00,,,TRANSFER DEBIT INTERNET TRANSFER,INTERNET TRANSFER SAV TO MECU,0.00,
|
4
|
+
04-Nov-9,1234.00,,,TRANSFER CREDIT INTERNET TRANSFER,INTERNET TRANSFER,1234.00,
|
5
|
+
28-Oct-10,-123.12,,,TRANSFER DEBIT INTERNET TRANSFER,INTERNET TRANSFER SAV TO MORTGAGE,0.00,
|
@@ -0,0 +1,7 @@
|
|
1
|
+
"12/10/2014","Dn Ing Inv","[DN]ING INV/PLA","0.01","credit","Investments","Chequing","",""
|
2
|
+
"2/03/2014","Ds Lms Msp Condo","[DS]LMS598 MSP/DIV","331.63","debit","Condo Fees","Chequing","",""
|
3
|
+
"2/10/2014","Ib Granville","[IB] 2601 GRANVILLE","100.00","debit","Uncategorized","Chequing","",""
|
4
|
+
"2/06/2014","So Pa","[SO]PA 0005191230116379851","140.72","debit","Mortgage & Rent","Chequing","",""
|
5
|
+
"2/03/2014","Dn Sun Life","[DN]SUN LIFE MSP/DIV","943.34","credit","Income","Chequing","",""
|
6
|
+
"1/30/2014","Transfer to CBT (Savings)","[CW] TF 0004#3409-797","500.00","debit","Transfer","Chequing","",""
|
7
|
+
"1/30/2014","Costco","[PR]COSTCO WHOLESAL","559.96","debit","Business Services","Chequing","",""
|
@@ -0,0 +1,6 @@
|
|
1
|
+
-
|
2
|
+
="0234500012345678";21/11/2015;19/02/2016;36;19/02/2016;1234,37 EUR
|
3
|
+
|
4
|
+
Date de l'opération;Libellé;Détail de l'écriture;Montant de l'opération;Devise
|
5
|
+
19/02/2016;VIR RECU 508160;VIR RECU 1234567834S DE: Francois REF: 123457891234567894561231 PROVENANCE: DE Allemagne ;50,00;EUR
|
6
|
+
18/02/2016;COTISATION JAZZ;COTISATION JAZZ ;-8,10;EUR
|
@@ -0,0 +1,16 @@
|
|
1
|
+
2013/01/17,2013/01/16,2013011702,DEBIT,2226,"VODAFONE PREPAY VISA M AUCKLAND NZL",30.00
|
2
|
+
2013/01/18,2013/01/17,2013011801,DEBIT,2226,"WILSON PARKING AUCKLAND NZL",4.60
|
3
|
+
2013/01/18,2013/01/17,2013011802,DEBIT,2226,"AUCKLAND TRANSPORT HENDERSON NZL",2.00
|
4
|
+
2013/01/19,2013/01/19,2013011901,CREDIT,2226,"INTERNET PAYMENT RECEIVED ",-500.00
|
5
|
+
2013/01/26,2013/01/23,2013012601,DEBIT,2226,"ITUNES NZ CORK IRL",64.99
|
6
|
+
2013/01/26,2013/01/25,2013012602,DEBIT,2226,"VODAFONE FXFLNE BBND R NEWTON NZL",90.26
|
7
|
+
2013/01/29,2013/01/29,2013012901,CREDIT,2101,"PAYMENT RECEIVED THANK YOU ",-27.75
|
8
|
+
2013/01/30,2013/01/29,2013013001,DEBIT,2226,"AUCKLAND TRANSPORT HENDERSON NZL",3.50
|
9
|
+
2013/02/05,2013/02/03,2013020501,DEBIT,2226,"Z BEACH RD AUCKLAND NZL",129.89
|
10
|
+
2013/02/05,2013/02/03,2013020502,DEBIT,2226,"TOURNAMENT KHYBER PASS AUCKLAND NZL",8.00
|
11
|
+
2013/02/05,2013/02/04,2013020503,DEBIT,2226,"VODAFONE PREPAY VISA M AUCKLAND NZL",30.00
|
12
|
+
2013/02/08,2013/02/07,2013020801,DEBIT,2226,"AKLD TRANSPORT PARKING AUCKLAND NZL",2.50
|
13
|
+
2013/02/08,2013/02/07,2013020802,DEBIT,2226,"AUCKLAND TRANSPORT HENDERSON NZL",3.50
|
14
|
+
2013/02/12,2013/02/11,2013021201,DEBIT,2226,"AKLD TRANSPORT PARKING AUCKLAND NZL",1.50
|
15
|
+
2013/02/17,2013/02/17,2013021701,CREDIT,2226,"INTERNET PAYMENT RECEIVED ",-12.00
|
16
|
+
2013/02/17,2013/02/17,2013021702,CREDIT,2226,"INTERNET PAYMENT RECEIVED ",-18.00
|
@@ -0,0 +1,9 @@
|
|
1
|
+
DEBIT,2011/12/24,"HOST 037196321563 MO 12/22SLICEHOST",($85.00)
|
2
|
+
CHECK,2010/12/24,"CHECK 2656",($20.00)
|
3
|
+
DEBIT,2009/12/24,"GITHUB 041287430274 CA 12/22GITHUB 04",($7.00)
|
4
|
+
CREDIT,2008/12/24,"Some Company vendorpymt PPD ID: 59728JSL20",$3520.00
|
5
|
+
CREDIT,2007/12/24,"Blarg BLARG REVENUE PPD ID: 00jah78563",$1558.52
|
6
|
+
DEBIT,2006/12/24,"WEBSITE-BALANCE-17DEC09 12 12/17WEBSITE-BAL",$.23
|
7
|
+
DEBIT,2005/12/24,"WEBSITE-BALANCE-10DEC09 12 12/10WEBSITE-BAL",($0.96)
|
8
|
+
CREDIT,2004/12/24,"PAYPAL TRANSFER PPD ID: PAYPALSDSL",($116.22)
|
9
|
+
CREDIT,2003/12/24,"Some Company vendorpymt PPD ID: 5KL3832735",$2105.00
|
@@ -0,0 +1,7 @@
|
|
1
|
+
11/01/2014,0, Deposit,0,500.00,500.00
|
2
|
+
11/02/2014,101,Check,100.00,0,400.00
|
3
|
+
11/03/2014,102,Check,100.00,0,300.00
|
4
|
+
11/04/2014,103,Check,100.00,0,200.00
|
5
|
+
11/05/2014,104,Check,100.00,0,100.00
|
6
|
+
11/06/2014,105,Check,100.00,0,0.00
|
7
|
+
11/17/2014,0, Deposit,0,700.00,700.00
|
@@ -0,0 +1,5 @@
|
|
1
|
+
4/1/2008,Check - 0000000122,122,-$76.00,"","$1,750.06"
|
2
|
+
3/28/2008,BLARG R SH 456930,"","",+$327.49,"$1,826.06"
|
3
|
+
3/27/2008,Check - 0000000112,112,-$800.00,"","$1,498.57"
|
4
|
+
3/26/2008,Check - 0000000251,251,-$88.55,"","$1,298.57"
|
5
|
+
3/26/2008,Check - 0000000251,251,"","+$88.55","$1,298.57"
|
@@ -0,0 +1 @@
|
|
1
|
+
DEBIT,20121231,"ODESK***BAL-27DEC12 650-12345 CA 12/28",-123.45
|
data/spec/reckon/app_spec.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# encoding: utf-8
|
3
2
|
|
4
3
|
require "spec_helper"
|
5
4
|
require 'rubygems'
|
@@ -8,18 +7,18 @@ require 'reckon'
|
|
8
7
|
describe Reckon::App do
|
9
8
|
context 'with chase csv input' do
|
10
9
|
before do
|
11
|
-
@chase = Reckon::App.new(:
|
12
|
-
@chase.learn_from(
|
10
|
+
@chase = Reckon::App.new(string: BANK_CSV)
|
11
|
+
@chase.learn_from(BANK_LEDGER)
|
13
12
|
@rows = []
|
14
|
-
@chase.each_row_backwards { |row| @rows.push(
|
13
|
+
@chase.each_row_backwards { |row| @rows.push(row) }
|
15
14
|
end
|
16
15
|
|
17
16
|
describe "each_row_backwards" do
|
18
17
|
it "should return rows with hashes" do
|
19
|
-
@rows[0][:pretty_date].should == "2009
|
18
|
+
@rows[0][:pretty_date].should == "2009-12-10"
|
20
19
|
@rows[0][:pretty_money].should == " $2105.00"
|
21
20
|
@rows[0][:description].should == "CREDIT; Some Company vendorpymt PPD ID: 5KL3832735"
|
22
|
-
@rows[1][:pretty_date].should == "2009
|
21
|
+
@rows[1][:pretty_date].should == "2009-12-11"
|
23
22
|
@rows[1][:pretty_money].should == "-$116.22"
|
24
23
|
@rows[1][:description].should == "CREDIT; PAYPAL TRANSFER PPD ID: PAYPALSDSL"
|
25
24
|
end
|
@@ -27,53 +26,87 @@ describe Reckon::App do
|
|
27
26
|
|
28
27
|
describe "weighted_account_match" do
|
29
28
|
it "should guess the correct account" do
|
30
|
-
|
29
|
+
row = @rows.find { |n| n[:description] =~ /Book Store/ }
|
30
|
+
|
31
|
+
result = @chase.matcher.find_similar(row[:description]).first
|
32
|
+
expect(result[:account]).to eq("Expenses:Books")
|
33
|
+
expect(result[:similarity]).to be > 0.0
|
31
34
|
end
|
32
35
|
end
|
33
36
|
end
|
34
37
|
|
35
38
|
context 'unattended mode with chase csv input' do
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
39
|
+
let(:output_file) { StringIO.new }
|
40
|
+
let(:chase) {
|
41
|
+
Reckon::App.new(
|
42
|
+
string: BANK_CSV,
|
43
|
+
unattended: true,
|
44
|
+
output_file: output_file,
|
45
|
+
bank_account: 'Assets:Bank:Checking'
|
46
|
+
)
|
47
|
+
}
|
40
48
|
|
41
49
|
describe 'walk backwards' do
|
42
50
|
it 'should assign Income:Unknown and Expenses:Unknown by default' do
|
43
|
-
|
44
|
-
|
45
|
-
|
51
|
+
chase.walk_backwards
|
52
|
+
expect(output_file.string.scan('Expenses:Unknown').count).to eq(5)
|
53
|
+
expect(output_file.string.scan('Income:Unknown').count).to eq(4)
|
46
54
|
end
|
47
55
|
|
48
56
|
it 'should change default account names' do
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
+
chase = Reckon::App.new(
|
58
|
+
string: BANK_CSV,
|
59
|
+
unattended: true,
|
60
|
+
output_file: output_file,
|
61
|
+
default_into_account: 'Expenses:Default',
|
62
|
+
default_outof_account: 'Income:Default',
|
63
|
+
bank_account: 'Assets:Bank:Checking',
|
64
|
+
)
|
65
|
+
chase.walk_backwards
|
66
|
+
expect(output_file.string.scan('Expenses:Default').count).to eq(5)
|
67
|
+
expect(output_file.string.scan('Income:Default').count).to eq(4)
|
57
68
|
end
|
58
69
|
|
59
70
|
it 'should learn from a ledger file' do
|
60
|
-
|
61
|
-
|
62
|
-
|
71
|
+
chase.learn_from( BANK_LEDGER )
|
72
|
+
chase.walk_backwards
|
73
|
+
output_file.string.scan('Expenses:Books').count.should == 1
|
63
74
|
end
|
64
75
|
|
65
76
|
it 'should learn from an account tokens file and parse regexps' do
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
77
|
+
chase = Reckon::App.new(
|
78
|
+
string: BANK_CSV,
|
79
|
+
unattended: true,
|
80
|
+
output_file: output_file,
|
81
|
+
account_tokens_file: fixture_path('tokens.yaml'),
|
82
|
+
bank_account: 'Assets:Bank:Checking',
|
83
|
+
)
|
84
|
+
chase.walk_backwards
|
85
|
+
expect(output_file.string.scan('Expenses:Books').count).to eq(1)
|
86
|
+
expect(output_file.string.scan('Expenses:Websites').count).to eq(2)
|
73
87
|
end
|
74
88
|
end
|
75
89
|
end
|
76
90
|
|
91
|
+
context "Issue #73 - regression test" do
|
92
|
+
it "should categorize transaction correctly" do
|
93
|
+
output = StringIO.new
|
94
|
+
app = Reckon::App.new(
|
95
|
+
file: fixture_path('73-sample.csv'),
|
96
|
+
unattended: true,
|
97
|
+
account_tokens_file: fixture_path('73-tokens.yml'),
|
98
|
+
bank_account: "Liabilities:Credit Cards:Visa",
|
99
|
+
contains_header: 1,
|
100
|
+
ignore_column: [4],
|
101
|
+
date_format: '%m/%d/%Y',
|
102
|
+
output_file: output
|
103
|
+
)
|
104
|
+
app.walk_backwards
|
105
|
+
|
106
|
+
expect(output.string).to include('Expenses:Automotive:Car Wash')
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
77
110
|
#DATA
|
78
111
|
BANK_CSV = (<<-CSV).strip
|
79
112
|
DEBIT,20091224120000[0:GMT],"HOST 037196321563 MO 12/22SLICEHOST",-85.00
|
@@ -95,6 +128,5 @@ describe Reckon::App do
|
|
95
128
|
2004/05/27 Book Store
|
96
129
|
Expenses:Books $20.00
|
97
130
|
Liabilities:MasterCard
|
98
|
-
|
99
|
-
|
131
|
+
LEDGER
|
100
132
|
end
|
@@ -1,47 +1,77 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
#
|
2
|
+
# coding: utf-8
|
3
3
|
|
4
|
-
|
4
|
+
require_relative "../spec_helper"
|
5
5
|
require 'rubygems'
|
6
|
-
|
6
|
+
require_relative '../../lib/reckon'
|
7
7
|
|
8
8
|
Reckon::CSVParser.settings[:testing] = true
|
9
9
|
|
10
10
|
describe Reckon::CSVParser do
|
11
11
|
before do
|
12
|
-
@chase = Reckon::CSVParser.new(:
|
13
|
-
@some_other_bank = Reckon::CSVParser.new(:
|
14
|
-
@two_money_columns = Reckon::CSVParser.new(:
|
15
|
-
@suntrust_csv = Reckon::CSVParser.new(:
|
16
|
-
@simple_csv = Reckon::CSVParser.new(:
|
17
|
-
@nationwide = Reckon::CSVParser.new(
|
18
|
-
@german_date = Reckon::CSVParser.new(:
|
19
|
-
@danish_kroner_nordea = Reckon::CSVParser.new(:
|
20
|
-
@yyyymmdd_date = Reckon::CSVParser.new(:
|
21
|
-
@spanish_date = Reckon::CSVParser.new(:
|
22
|
-
@english_date = Reckon::CSVParser.new(:
|
23
|
-
@ing_csv = Reckon::CSVParser.new(:
|
24
|
-
@austrian_csv = Reckon::CSVParser.new(:
|
25
|
-
@french_csv = Reckon::CSVParser.new(:
|
26
|
-
@broker_canada = Reckon::CSVParser.new(:
|
27
|
-
@intuit_mint = Reckon::CSVParser.new(:
|
12
|
+
@chase = Reckon::CSVParser.new(file: fixture_path('chase.csv'))
|
13
|
+
@some_other_bank = Reckon::CSVParser.new(file: fixture_path('some_other.csv'))
|
14
|
+
@two_money_columns = Reckon::CSVParser.new(file: fixture_path('two_money_columns.csv'))
|
15
|
+
@suntrust_csv = Reckon::CSVParser.new(file: fixture_path('suntrust.csv'))
|
16
|
+
@simple_csv = Reckon::CSVParser.new(file: fixture_path('simple.csv'))
|
17
|
+
@nationwide = Reckon::CSVParser.new(file: fixture_path('nationwide.csv'), csv_separator: ',', suffixed: true, currency: "POUND")
|
18
|
+
@german_date = Reckon::CSVParser.new(file: fixture_path('german_date_example.csv'))
|
19
|
+
@danish_kroner_nordea = Reckon::CSVParser.new(file: fixture_path('danish_kroner_nordea_example.csv'), csv_separator: ';', comma_separates_cents: true)
|
20
|
+
@yyyymmdd_date = Reckon::CSVParser.new(file: fixture_path('yyyymmdd_date_example.csv'))
|
21
|
+
@spanish_date = Reckon::CSVParser.new(file: fixture_path('spanish_date_example.csv'), date_format: '%d/%m/%Y')
|
22
|
+
@english_date = Reckon::CSVParser.new(file: fixture_path('english_date_example.csv'))
|
23
|
+
@ing_csv = Reckon::CSVParser.new(file: fixture_path('ing.csv'), comma_separates_cents: true )
|
24
|
+
@austrian_csv = Reckon::CSVParser.new(file: fixture_path('austrian_example.csv'), comma_separates_cents: true, csv_separator: ';' )
|
25
|
+
@french_csv = Reckon::CSVParser.new(file: fixture_path('french_example.csv'), csv_separator: ';', comma_separates_cents: true)
|
26
|
+
@broker_canada = Reckon::CSVParser.new(file: fixture_path('broker_canada_example.csv'))
|
27
|
+
@intuit_mint = Reckon::CSVParser.new(file: fixture_path('intuit_mint_example.csv'))
|
28
28
|
end
|
29
29
|
|
30
30
|
it "should be in testing mode" do
|
31
|
-
@chase.settings[:testing].should
|
32
|
-
Reckon::CSVParser.settings[:testing].should
|
31
|
+
@chase.settings[:testing].should be true
|
32
|
+
Reckon::CSVParser.settings[:testing].should be true
|
33
33
|
end
|
34
34
|
|
35
35
|
describe "parse" do
|
36
|
+
it "should use binary encoding if none specified and chardet fails" do
|
37
|
+
allow(CharDet).to receive(:detect).and_return({'encoding' => nil})
|
38
|
+
app = Reckon::CSVParser.new(file: fixture_path("extratofake.csv"))
|
39
|
+
expect(app.try_encoding("foobarbaz")).to eq("BINARY")
|
40
|
+
end
|
41
|
+
|
36
42
|
it "should work with foreign character encodings" do
|
37
|
-
app = Reckon::CSVParser.new(:
|
43
|
+
app = Reckon::CSVParser.new(file: fixture_path("extratofake.csv"))
|
38
44
|
app.columns[0][0..2].should == ["Data", "10/31/2012", "11/01/2012"]
|
39
|
-
app.columns[2].first.should == "
|
45
|
+
app.columns[2].first.should == "Histórico"
|
40
46
|
end
|
41
47
|
|
42
48
|
it "should work with other separators" do
|
43
49
|
Reckon::CSVParser.new(:string => "one;two\nthree;four", :csv_separator => ';').columns.should == [['one', 'three'], ['two', 'four']]
|
44
50
|
end
|
51
|
+
|
52
|
+
it 'should parse quoted lines' do
|
53
|
+
file = %q("30.03.2015";"29.03.2015";"09.04.2015";"BARAUSZAHLUNGSENTGELT";"5266 xxxx xxxx 9454";"";"0";"EUR";"0,00";"EUR";"-3,50";"0")
|
54
|
+
Reckon::CSVParser.new(string: file, csv_separator: ';', comma_separates_cents: true).columns.length.should == 12
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'should parse csv with BOM' do
|
58
|
+
file = File.expand_path(fixture_path("bom_utf8_file.csv"))
|
59
|
+
Reckon::CSVParser.new(file: file).columns.length.should == 41
|
60
|
+
end
|
61
|
+
|
62
|
+
describe 'file with invalid csv in header' do
|
63
|
+
let(:invalid_file) { fixture_path('invalid_header_example.csv') }
|
64
|
+
|
65
|
+
it 'should ignore invalid header lines' do
|
66
|
+
Reckon::CSVParser.new(file: invalid_file, contains_header: 4)
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'should fail' do
|
70
|
+
expect { Reckon::CSVParser.new(file: invalid_file, contains_header: 1) }.to(
|
71
|
+
raise_error(CSV::MalformedCSVError)
|
72
|
+
)
|
73
|
+
end
|
74
|
+
end
|
45
75
|
end
|
46
76
|
|
47
77
|
describe "columns" do
|
@@ -59,7 +89,7 @@ describe Reckon::CSVParser do
|
|
59
89
|
|
60
90
|
describe "detect_columns" do
|
61
91
|
before do
|
62
|
-
@harder_date_example_csv = Reckon::CSVParser.new(:
|
92
|
+
@harder_date_example_csv = Reckon::CSVParser.new(file: fixture_path('harder_date_example.csv'))
|
63
93
|
end
|
64
94
|
|
65
95
|
it "should detect the money column" do
|
@@ -73,7 +103,7 @@ describe Reckon::CSVParser do
|
|
73
103
|
@yyyymmdd_date.money_column_indices.should == [3]
|
74
104
|
@ing_csv.money_column_indices.should == [6]
|
75
105
|
@austrian_csv.money_column_indices.should == [4]
|
76
|
-
@french_csv.money_column_indices.should == [
|
106
|
+
@french_csv.money_column_indices.should == [4]
|
77
107
|
@broker_canada.money_column_indices.should == [8]
|
78
108
|
@intuit_mint.money_column_indices.should == [3]
|
79
109
|
end
|
@@ -85,7 +115,7 @@ describe Reckon::CSVParser do
|
|
85
115
|
@harder_date_example_csv.date_column_index.should == 0
|
86
116
|
@danish_kroner_nordea.date_column_index.should == 0
|
87
117
|
@yyyymmdd_date.date_column_index.should == 1
|
88
|
-
@french_csv.date_column_index.should ==
|
118
|
+
@french_csv.date_column_index.should == 1
|
89
119
|
@broker_canada.date_column_index.should == 0
|
90
120
|
@intuit_mint.date_column_index.should == 0
|
91
121
|
Reckon::CSVParser.new(:string => '2014-01-13,"22211100000",-10').date_column_index.should == 0
|
@@ -101,6 +131,16 @@ describe Reckon::CSVParser do
|
|
101
131
|
end
|
102
132
|
end
|
103
133
|
|
134
|
+
describe "money_column_indicies" do
|
135
|
+
it "should prefer the option over the heuristic" do
|
136
|
+
chase = Reckon::CSVParser.new(file: fixture_path('chase.csv'))
|
137
|
+
expect(chase.money_column_indices).to eq([3])
|
138
|
+
|
139
|
+
chase = Reckon::CSVParser.new(file: fixture_path('chase.csv'), money_column: 2)
|
140
|
+
expect(chase.money_column_indices).to eq([1])
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
104
144
|
describe "money_for" do
|
105
145
|
it "should return the appropriate fields" do
|
106
146
|
@chase.money_for(1).should == -20
|
@@ -142,12 +182,22 @@ describe Reckon::CSVParser do
|
|
142
182
|
end
|
143
183
|
|
144
184
|
it "should return negated values if the inverse option is passed" do
|
145
|
-
inversed_csv = Reckon::CSVParser.new(:
|
185
|
+
inversed_csv = Reckon::CSVParser.new(file: fixture_path('inversed_credit_card.csv'), inverse: true)
|
146
186
|
inversed_csv.money_for(0).should == -30.00
|
147
187
|
inversed_csv.money_for(3).should == 500.00
|
148
188
|
end
|
149
189
|
end
|
150
190
|
|
191
|
+
describe "date_column_index" do
|
192
|
+
it "should prefer the option over the heuristic" do
|
193
|
+
chase = Reckon::CSVParser.new(file: fixture_path('chase.csv'))
|
194
|
+
expect(chase.date_column_index).to eq(1)
|
195
|
+
|
196
|
+
chase = Reckon::CSVParser.new(file: fixture_path('chase.csv'), date_column: 3)
|
197
|
+
expect(chase.date_column_index).to eq(2)
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
151
201
|
describe "date_for" do
|
152
202
|
it "should return a parsed date object" do
|
153
203
|
@chase.date_for(1).year.should == Time.parse("2009/12/24").year
|
@@ -206,7 +256,7 @@ describe Reckon::CSVParser do
|
|
206
256
|
end
|
207
257
|
|
208
258
|
it "work with other currencies such as €" do
|
209
|
-
euro_bank = Reckon::CSVParser.new(:
|
259
|
+
euro_bank = Reckon::CSVParser.new(file: fixture_path('some_other.csv'), currency: "€", suffixed: false )
|
210
260
|
euro_bank.pretty_money_for(1).should == "-€20.00"
|
211
261
|
euro_bank.pretty_money_for(4).should == " €1558.52"
|
212
262
|
euro_bank.pretty_money_for(7).should == "-€116.22"
|
@@ -215,7 +265,7 @@ describe Reckon::CSVParser do
|
|
215
265
|
end
|
216
266
|
|
217
267
|
it "work with suffixed currencies such as SEK" do
|
218
|
-
swedish_bank = Reckon::CSVParser.new(:
|
268
|
+
swedish_bank = Reckon::CSVParser.new(file: fixture_path('some_other.csv'), currency: 'SEK', suffixed: true )
|
219
269
|
swedish_bank.pretty_money_for(1).should == "-20.00 SEK"
|
220
270
|
swedish_bank.pretty_money_for(4).should == " 1558.52 SEK"
|
221
271
|
swedish_bank.pretty_money_for(7).should == "-116.22 SEK"
|
@@ -228,176 +278,4 @@ describe Reckon::CSVParser do
|
|
228
278
|
@nationwide.pretty_money_for(1).should == "-20.00 POUND"
|
229
279
|
end
|
230
280
|
end
|
231
|
-
|
232
|
-
# Data
|
233
|
-
|
234
|
-
SIMPLE_CSV = "entry1,entry2,entry3\nentry4,entry5,entry6"
|
235
|
-
|
236
|
-
CHASE_CSV = (<<-CSV).strip
|
237
|
-
DEBIT,20091224120000[0:GMT],"HOST 037196321563 MO 12/22SLICEHOST",-85.00
|
238
|
-
CHECK,20091224120000[0:GMT],"CHECK 2656",-20.00
|
239
|
-
DEBIT,20091224120000[0:GMT],"GITHUB 041287430274 CA 12/22GITHUB 04",-7.00
|
240
|
-
CREDIT,20091223120000[0:GMT],"Some Company vendorpymt PPD ID: 59728JSL20",3520.00
|
241
|
-
CREDIT,20091223120000[0:GMT],"Blarg BLARG REVENUE PPD ID: 00jah78563",1558.52
|
242
|
-
DEBIT,20091221120000[0:GMT],"WEBSITE-BALANCE-17DEC09 12 12/17WEBSITE-BAL",-12.23
|
243
|
-
DEBIT,20091214120000[0:GMT],"WEBSITE-BALANCE-10DEC09 12 12/10WEBSITE-BAL",-20.96
|
244
|
-
CREDIT,20091211120000[0:GMT],"PAYPAL TRANSFER PPD ID: PAYPALSDSL",-116.22
|
245
|
-
CREDIT,20091210120000[0:GMT],"Some Company vendorpymt PPD ID: 5KL3832735",2105.00
|
246
|
-
CSV
|
247
|
-
|
248
|
-
SOME_OTHER_CSV = (<<-CSV).strip
|
249
|
-
DEBIT,2011/12/24,"HOST 037196321563 MO 12/22SLICEHOST",($85.00)
|
250
|
-
CHECK,2010/12/24,"CHECK 2656",($20.00)
|
251
|
-
DEBIT,2009/12/24,"GITHUB 041287430274 CA 12/22GITHUB 04",($7.00)
|
252
|
-
CREDIT,2008/12/24,"Some Company vendorpymt PPD ID: 59728JSL20",$3520.00
|
253
|
-
CREDIT,2007/12/24,"Blarg BLARG REVENUE PPD ID: 00jah78563",$1558.52
|
254
|
-
DEBIT,2006/12/24,"WEBSITE-BALANCE-17DEC09 12 12/17WEBSITE-BAL",$.23
|
255
|
-
DEBIT,2005/12/24,"WEBSITE-BALANCE-10DEC09 12 12/10WEBSITE-BAL",($0.96)
|
256
|
-
CREDIT,2004/12/24,"PAYPAL TRANSFER PPD ID: PAYPALSDSL",($116.22)
|
257
|
-
CREDIT,2003/12/24,"Some Company vendorpymt PPD ID: 5KL3832735",$2105.00
|
258
|
-
CSV
|
259
|
-
|
260
|
-
INVERSED_CREDIT_CARD = (<<-CSV).strip
|
261
|
-
2013/01/17,2013/01/16,2013011702,DEBIT,2226,"VODAFONE PREPAY VISA M AUCKLAND NZL",30.00
|
262
|
-
2013/01/18,2013/01/17,2013011801,DEBIT,2226,"WILSON PARKING AUCKLAND NZL",4.60
|
263
|
-
2013/01/18,2013/01/17,2013011802,DEBIT,2226,"AUCKLAND TRANSPORT HENDERSON NZL",2.00
|
264
|
-
2013/01/19,2013/01/19,2013011901,CREDIT,2226,"INTERNET PAYMENT RECEIVED ",-500.00
|
265
|
-
2013/01/26,2013/01/23,2013012601,DEBIT,2226,"ITUNES NZ CORK IRL",64.99
|
266
|
-
2013/01/26,2013/01/25,2013012602,DEBIT,2226,"VODAFONE FXFLNE BBND R NEWTON NZL",90.26
|
267
|
-
2013/01/29,2013/01/29,2013012901,CREDIT,2101,"PAYMENT RECEIVED THANK YOU ",-27.75
|
268
|
-
2013/01/30,2013/01/29,2013013001,DEBIT,2226,"AUCKLAND TRANSPORT HENDERSON NZL",3.50
|
269
|
-
2013/02/05,2013/02/03,2013020501,DEBIT,2226,"Z BEACH RD AUCKLAND NZL",129.89
|
270
|
-
2013/02/05,2013/02/03,2013020502,DEBIT,2226,"TOURNAMENT KHYBER PASS AUCKLAND NZL",8.00
|
271
|
-
2013/02/05,2013/02/04,2013020503,DEBIT,2226,"VODAFONE PREPAY VISA M AUCKLAND NZL",30.00
|
272
|
-
2013/02/08,2013/02/07,2013020801,DEBIT,2226,"AKLD TRANSPORT PARKING AUCKLAND NZL",2.50
|
273
|
-
2013/02/08,2013/02/07,2013020802,DEBIT,2226,"AUCKLAND TRANSPORT HENDERSON NZL",3.50
|
274
|
-
2013/02/12,2013/02/11,2013021201,DEBIT,2226,"AKLD TRANSPORT PARKING AUCKLAND NZL",1.50
|
275
|
-
2013/02/17,2013/02/17,2013021701,CREDIT,2226,"INTERNET PAYMENT RECEIVED ",-12.00
|
276
|
-
2013/02/17,2013/02/17,2013021702,CREDIT,2226,"INTERNET PAYMENT RECEIVED ",-18.00
|
277
|
-
CSV
|
278
|
-
|
279
|
-
TWO_MONEY_COLUMNS_BANK = (<<-CSV).strip
|
280
|
-
4/1/2008,Check - 0000000122,122,-$76.00,"","$1,750.06"
|
281
|
-
3/28/2008,BLARG R SH 456930,"","",+$327.49,"$1,826.06"
|
282
|
-
3/27/2008,Check - 0000000112,112,-$800.00,"","$1,498.57"
|
283
|
-
3/26/2008,Check - 0000000251,251,-$88.55,"","$1,298.57"
|
284
|
-
3/26/2008,Check - 0000000251,251,"","+$88.55","$1,298.57"
|
285
|
-
CSV
|
286
|
-
|
287
|
-
SUNTRUST_CSV = (<<-CSV).strip
|
288
|
-
11/01/2014,0, Deposit,0,500.00,500.00
|
289
|
-
11/02/2014,101,Check,100.00,0,400.00
|
290
|
-
11/03/2014,102,Check,100.00,0,300.00
|
291
|
-
11/04/2014,103,Check,100.00,0,200.00
|
292
|
-
11/05/2014,104,Check,100.00,0,100.00
|
293
|
-
11/06/2014,105,Check,100.00,0,0.00
|
294
|
-
11/17/2014,0, Deposit,0,700.00,700.00
|
295
|
-
CSV
|
296
|
-
|
297
|
-
NATIONWIDE_CSV = (<<-CSV).strip
|
298
|
-
07 Nov 2013,Bank credit,Bank credit,,£500.00,£500.00
|
299
|
-
09 Oct 2013,ATM Withdrawal,Withdrawal,£20.00,,£480.00
|
300
|
-
09 Dec 2013,Visa,Supermarket,£19.77,,£460.23
|
301
|
-
10 Dec 2013,ATM Withdrawal 2,ATM Withdrawal 4,£100.00,,£360.23
|
302
|
-
CSV
|
303
|
-
|
304
|
-
ING_CSV = (<<-CSV).strip
|
305
|
-
20121115,From1,Acc,T1,IC,Af,"136,13",Incasso,SEPA Incasso, Opm1
|
306
|
-
20121112,Names,NL28 INGB 1200 3244 16,21817,GT,Bij,"375,00", Opm2
|
307
|
-
20091117,Names,NL28 INGB 1200 3244 16,21817,GT,Af,"257,50", Opm3
|
308
|
-
CSV
|
309
|
-
|
310
|
-
HARDER_DATE_EXAMPLE = (<<-CSV).strip
|
311
|
-
10-Nov-9,-123.12,,,TRANSFER DEBIT INTERNET TRANSFER,INTERNET TRANSFER MORTGAGE,0.00,
|
312
|
-
09-Nov-10,123.12,,,SALARY SALARY,NGHSKS46383BGDJKD FOO BAR,432.12,
|
313
|
-
04-Nov-11,-1234.00,,,TRANSFER DEBIT INTERNET TRANSFER,INTERNET TRANSFER SAV TO MECU,0.00,
|
314
|
-
04-Nov-9,1234.00,,,TRANSFER CREDIT INTERNET TRANSFER,INTERNET TRANSFER,1234.00,
|
315
|
-
28-Oct-10,-123.12,,,TRANSFER DEBIT INTERNET TRANSFER,INTERNET TRANSFER SAV TO MORTGAGE,0.00,
|
316
|
-
CSV
|
317
|
-
|
318
|
-
GERMAN_DATE_EXAMPLE = (<<-CSV).strip
|
319
|
-
24.12.2009,Check - 0000000122,122,-$76.00,"","$1,750.06"
|
320
|
-
24.12.2009,BLARG R SH 456930,"","",+$327.49,"$1,826.06"
|
321
|
-
24.12.2009,Check - 0000000112,112,-$800.00,"","$1,498.57"
|
322
|
-
CSV
|
323
|
-
|
324
|
-
DANISH_KRONER_NORDEA_EXAMPLE = (<<-CSV).strip
|
325
|
-
16-11-2012;Dankort-nota DSB Kobenhavn 15149;16-11-2012;-48,00;26550,33
|
326
|
-
26-10-2012;Dankort-nota Ziggy Cafe 19471;26-10-2012;-79,00;26054,54
|
327
|
-
22-10-2012;Dankort-nota H&M Hennes & M 10681;23-10-2012;497,90;25433,54
|
328
|
-
12-10-2012;Visa kob DKK 995,00 WWW.ASOS.COM 00000 ;12-10-2012;-995,00;27939,54
|
329
|
-
12-09-2012;Dankort-nota B.J. TRADING E 14660;12-09-2012;-3452,90;26164,80
|
330
|
-
27-08-2012;Dankort-nota MATAS - 20319 18230;27-08-2012;-655,00;21127,45
|
331
|
-
CSV
|
332
|
-
|
333
|
-
YYYYMMDD_DATE_EXAMPLE = (<<-CSV).strip
|
334
|
-
DEBIT,20121231,"ODESK***BAL-27DEC12 650-12345 CA 12/28",-123.45
|
335
|
-
CSV
|
336
|
-
|
337
|
-
SPANISH_DATE_EXAMPLE = (<<-CSV).strip
|
338
|
-
02/12/2009,Check - 0000000122,122,-$76.00,"","$1,750.06"
|
339
|
-
02/12/2009,BLARG R SH 456930,"","",+$327.49,"$1,826.06"
|
340
|
-
02/12/2009,Check - 0000000112,112,-$800.00,"","$1,498.57"
|
341
|
-
CSV
|
342
|
-
|
343
|
-
ENGLISH_DATE_EXAMPLE = (<<-CSV).strip
|
344
|
-
24/12/2009,Check - 0000000122,122,-$76.00,"","$1,750.06"
|
345
|
-
24/12/2009,BLARG R SH 456930,"","",+$327.49,"$1,826.06"
|
346
|
-
24/12/2009,Check - 0000000112,112,-$800.00,"","$1,498.57"
|
347
|
-
CSV
|
348
|
-
|
349
|
-
AUSTRIAN_EXAMPLE = (<<-CSV).strip
|
350
|
-
00075757575;Abbuchung Onlinebanking 654321098765 BG/000002462 BICBICBI AT654000000065432109 Thematische Universität Stadt ;22.01.2014;22.01.2014;-18,00;EUR
|
351
|
-
00075757575;333222111333222 222111333222 OG/000002461 BICBICBIXXX AT333000000003332221 Telekom Land AG RECHNUNG 11/13 333222111333222 ;17.01.2014;17.01.2014;-9,05;EUR
|
352
|
-
00075757575;Helm BG/000002460 10000 00007878787 Muster Dr.Beispiel-Vorname ;15.01.2014;15.01.2014;+120,00;EUR
|
353
|
-
00075757575;Gutschrift Dauerauftrag BG/000002459 BICBICBI AT787000000007878787 Muster Dr.Beispiel-Vorname ;15.01.2014;15.01.2014;+22,00;EUR
|
354
|
-
00075757575;Bezahlung Bankomat MC/000002458 0001 K1 06.01.UM 18.11 Bahn 8020 FSA\\Ort\10 10 2002200EUR ;07.01.2014;06.01.2014;-37,60;EUR
|
355
|
-
00075757575;Bezahlung Bankomat 10.33 MC/000002457 0001 K1 02.01.UM 10.33 Abcdef Electronic\\Wie n\1150 0400444 ;03.01.2014;02.01.2014;-46,42;EUR
|
356
|
-
00075757575;050055556666000 OG/000002456 BKAUATWWXXX AT555500000555566665 JKL Telekommm Stadt GmbH JKL Rechnung 555666555 ;03.01.2014;03.01.2014;-17,15;EUR
|
357
|
-
00075757575;Abbuchung Einzugsermächtigung OG/000002455 INTERNATIONALER AUTOMOBIL-, 10000 00006655665 ;02.01.2014;02.01.2014;-17,40;EUR
|
358
|
-
00075757575;POLIZZE 1/01/0101010 Fondsge010101010101nsverOG/000002454 BICBICBIXXX AT101000000101010101 VERSICHERUNG NAMEDERV AG POLIZZE 1/01/0101010 Fondsgebundene Lebensversicherung - fällig 01.01. 2014 Folg eprämie ;02.01.2014;02.01.2014;-31,71;EUR
|
359
|
-
00075757575;POLIZZE 1/01/0101012 Rentenv010101010102- fälOG/000002453 BICBICBIXXX AT101000000101010102 VERSICHERUNG NAMEDERV AG POLIZZE 1/01/0101012 Rentenversicherung - fällig 01.01.20 14 Folgeprämi e ;02.01.2014;02.01.2014;-32,45;EUR
|
360
|
-
00075757575;Anlass VD/000002452 BKAUATWWBRN AT808800080880880880 Dipl.Ing.Dr. Berta Beispiel ;02.01.2014;02.01.2014;+61,90;EUR
|
361
|
-
00075757575;Abbuchung Onlinebanking 000009999999 BG/000002451 BICBICBI AT099000000009999999 Asdfjklöasdf Asdfjklöasdfjklöasdf ;02.01.2014;02.01.2014;-104,69;EUR
|
362
|
-
00075757575;Abbuchung Onlinebanking FE/000002450 AT556600055665566556 CD Stadt Efghij Club Dipl.Ing. Max Muster M005566 - Mitgliedsbeitrag 2014 ;02.01.2014;02.01.2014;-39,00;EUR
|
363
|
-
CSV
|
364
|
-
|
365
|
-
FRENCH_EXAMPLE = (<<-CSV).strip
|
366
|
-
01234567890;22/01/2014;22/01/2014;CHEQUE 012345678901234578ABC000 0000 4381974748378178473744441;0000037;22/01/2014;-10,00;
|
367
|
-
01234567890;22/01/2014;22/01/2014;CHEQUE 012345678901937845500TS1 0000 7439816947047874387438445;0000038;22/01/2014;-5,76;
|
368
|
-
01234567890;22/01/2014;22/01/2014;CARTE 012345 CB:*0123456 XX XXXXXX XXX 33BORDEAUX;00X0X0X;22/01/2014;-105,90;
|
369
|
-
01234567890;22/01/2014;22/01/2014;CARTE 012345 CB:*0123456 XXXXXXXXXXX 33SAINT ANDRE D;00X0X0X;22/01/2014;-39,99;
|
370
|
-
01234567890;22/01/2014;22/01/2014;CARTE 012345 CB:*0123456 XXXXXXX XXXXX 33BORDEAUX;10X9X6X;22/01/2014;-36,00;
|
371
|
-
01234567890;22/01/2014;22/01/2014;PRLV XXXXXXXX ABONNEMENT XXXXXXXXXXXXXX.NET N.EMETTEUR: 324411;0XX0XXX;22/01/2014;-40,00;
|
372
|
-
01234567890;21/01/2014;21/01/2014;CARTE 012345 CB:*0123456 XXXXX XX33433ST ANDRE DE C;0POBUES;21/01/2014;-47,12;
|
373
|
-
01234567890;21/01/2014;21/01/2014;CARTE 012345 CB:*0123456 XXXXXXXXXXXX33433ST ANDRE DE C;0POBUER;21/01/2014;-27,02;
|
374
|
-
01234567890;21/01/2014;21/01/2014;CARTE 012345 CB:*0123456 XXXXXX XXXXXXXX33ST ANDRE 935/;0POBUEQ;21/01/2014;-25,65;
|
375
|
-
CSV
|
376
|
-
|
377
|
-
BROKER_CANADA_EXAMPLE = (<<-CSV).strip
|
378
|
-
2014-02-10,2014-02-10,Interest,ISHARES S&P/TSX CAPPED REIT IN,XRE,179,,,12.55,CAD
|
379
|
-
2014-01-16,2014-01-16,Reinvestment,ISHARES GLOBAL AGRICULTURE IND,COW,3,,,-81.57,CAD
|
380
|
-
2014-01-16,2014-01-16,Contribution,CONTRIBUTION,,,,,600.00,CAD
|
381
|
-
2014-01-16,2014-01-16,Interest,ISHARES GLOBAL AGRICULTURE IND,COW,200,,,87.05,CAD
|
382
|
-
2014-01-14,2014-01-14,Reinvestment,BMO NASDAQ 100 EQTY HEDGED TO,ZQQ,2,,,-54.72,CAD
|
383
|
-
2014-01-07,2014-01-10,Sell,BMO NASDAQ 100 EQTY HEDGED TO,ZQQ,-300,27.44,CDN,8222.05,CAD
|
384
|
-
2014-01-07,2014-01-07,Interest,BMO S&P/TSX EQUAL WEIGHT BKS I,ZEB,250,,,14.00,CAD
|
385
|
-
2013-07-02,2013-07-02,Dividend,SELECT SECTOR SPDR FD SHS BEN,XLB,130,,,38.70,USD
|
386
|
-
2013-06-27,2013-06-27,Dividend,ICICI BK SPONSORED ADR,IBN,100,,,66.70,USD
|
387
|
-
2013-06-19,2013-06-24,Buy,ISHARES S&P/TSX CAPPED REIT IN,XRE,300,15.90,CDN,-4779.95,CAD
|
388
|
-
2013-06-17,2013-06-17,Contribution,CONTRIBUTION,,,,,600.00,CAD
|
389
|
-
2013-05-22,2013-05-22,Dividend,NATBK,NA,70,,,58.10,CAD
|
390
|
-
CSV
|
391
|
-
|
392
|
-
INTUIT_MINT_EXAMPLE = (<<-CSV).strip
|
393
|
-
"12/10/2014","Dn Ing Inv","[DN]ING INV/PLA","0.01","credit","Investments","Chequing","",""
|
394
|
-
"2/03/2014","Ds Lms Msp Condo","[DS]LMS598 MSP/DIV","331.63","debit","Condo Fees","Chequing","",""
|
395
|
-
"2/10/2014","Ib Granville","[IB] 2601 GRANVILLE","100.00","debit","Uncategorized","Chequing","",""
|
396
|
-
"2/06/2014","So Pa","[SO]PA 0005191230116379851","140.72","debit","Mortgage & Rent","Chequing","",""
|
397
|
-
"2/03/2014","Dn Sun Life","[DN]SUN LIFE MSP/DIV","943.34","credit","Income","Chequing","",""
|
398
|
-
"1/30/2014","Transfer to CBT (Savings)","[CW] TF 0004#3409-797","500.00","debit","Transfer","Chequing","",""
|
399
|
-
"1/30/2014","Costco","[PR]COSTCO WHOLESAL","559.96","debit","Business Services","Chequing","",""
|
400
|
-
CSV
|
401
|
-
|
402
|
-
|
403
281
|
end
|