reckon 0.4.4 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +3 -0
- data/.ruby-version +1 -1
- data/.travis.yml +10 -2
- data/CHANGELOG.md +235 -0
- data/Gemfile +0 -1
- data/Gemfile.lock +73 -15
- data/README.md +12 -5
- data/lib/reckon.rb +13 -12
- data/lib/reckon/app.rb +94 -116
- data/lib/reckon/cosine_similarity.rb +122 -0
- data/lib/reckon/csv_parser.rb +116 -129
- data/lib/reckon/date_column.rb +60 -0
- data/lib/reckon/ledger_parser.rb +204 -30
- data/lib/reckon/logger.rb +4 -0
- data/lib/reckon/money.rb +6 -62
- data/lib/reckon/version.rb +3 -0
- data/reckon.gemspec +8 -5
- data/spec/data_fixtures/51-sample.csv +8 -0
- data/spec/data_fixtures/51-tokens.yml +9 -0
- 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/85-date-example.csv +2 -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/test_money_column.csv +3 -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 +96 -34
- data/spec/reckon/csv_parser_spec.rb +185 -307
- data/spec/reckon/date_column_spec.rb +12 -13
- data/spec/reckon/ledger_parser_spec.rb +99 -9
- data/spec/reckon/money_spec.rb +42 -29
- data/spec/spec_helper.rb +22 -0
- metadata +85 -21
- data/CHANGES.md +0 -9
@@ -20,23 +20,22 @@ describe Reckon::DateColumn do
|
|
20
20
|
end
|
21
21
|
describe "for" do
|
22
22
|
it "should detect the date" do
|
23
|
-
Reckon::DateColumn.new(
|
24
|
-
|
25
|
-
Reckon::DateColumn.new(
|
26
|
-
|
27
|
-
Reckon::DateColumn.new(
|
28
|
-
|
29
|
-
Reckon::DateColumn.new( ["2013-11-21"] ).for( 0 )
|
30
|
-
|
23
|
+
expect(Reckon::DateColumn.new(%w[13/12/2013]).for(0))
|
24
|
+
.to eq(Date.new(2013, 12, 13))
|
25
|
+
expect(Reckon::DateColumn.new(%w[01/14/2013]).for(0))
|
26
|
+
.to eq(Date.new(2013, 1, 14))
|
27
|
+
expect(Reckon::DateColumn.new(%w[13/12/2013 21/11/2013]).for(1))
|
28
|
+
.to eq(Date.new(2013, 11, 21))
|
29
|
+
expect(Reckon::DateColumn.new( ["2013-11-21"] ).for( 0 ))
|
30
|
+
.to eq(Date.new(2013, 11, 21))
|
31
31
|
|
32
32
|
end
|
33
33
|
|
34
34
|
it "should correctly use endian_precedence" do
|
35
|
-
Reckon::DateColumn.new(
|
36
|
-
|
37
|
-
Reckon::DateColumn.new(
|
38
|
-
|
35
|
+
expect(Reckon::DateColumn.new(%w[01/02/2013 01/14/2013]).for(0))
|
36
|
+
.to eq(Date.new(2013, 1, 2))
|
37
|
+
expect(Reckon::DateColumn.new(%w[01/02/2013 14/01/2013]).for(0))
|
38
|
+
.to eq(Date.new(2013, 2, 1))
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
42
|
-
|
@@ -1,31 +1,121 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
#encoding: utf-8
|
3
3
|
|
4
|
-
|
4
|
+
require_relative "../spec_helper"
|
5
5
|
require 'rubygems'
|
6
6
|
require 'reckon'
|
7
7
|
require 'pp'
|
8
|
+
require 'rantly'
|
9
|
+
require 'rantly/rspec_extensions'
|
10
|
+
require 'shellwords'
|
8
11
|
|
9
12
|
describe Reckon::LedgerParser do
|
10
13
|
before do
|
11
|
-
@ledger = Reckon::LedgerParser.new(EXAMPLE_LEDGER)
|
14
|
+
@ledger = Reckon::LedgerParser.new(EXAMPLE_LEDGER, date_format: '%Y/%m/%d')
|
12
15
|
end
|
13
16
|
|
14
17
|
describe "parse" do
|
18
|
+
it "should match ledger csv output" do
|
19
|
+
# ledger only parses dates with - or / as separator, and separator is required
|
20
|
+
formats = ["%Y/%m/%d", "%Y-%m-%d"]
|
21
|
+
types = [' ! ', ' * ', ' ']
|
22
|
+
delimiters = [" ", "\t", "\t\t"]
|
23
|
+
comment_chars = ';#%*|'
|
24
|
+
currency_delimiters = delimiters + ['']
|
25
|
+
currencies = ['', '$', '£']
|
26
|
+
property_of do
|
27
|
+
Rantly do
|
28
|
+
description = Proc.new do
|
29
|
+
sized(15){string}.tr(%q{'`:*\\},'').gsub(/\s+/, ' ').gsub(/^[!;<\[( #{comment_chars}]+/, '')
|
30
|
+
end
|
31
|
+
currency = choose(*currencies) # to be consistent within the transaction
|
32
|
+
single_line_comments = ";#|%*".split('').map { |n| "#{n} #{call(description)}" }
|
33
|
+
comments = ['', '; ', "\t;#{call(description)}", " ; #{call(description)}"]
|
34
|
+
date = Time.at(range(0, 1_581_389_644)).strftime(choose(*formats))
|
35
|
+
codes = [' ', " (#{string(:alnum).tr('()', '')}) "]
|
36
|
+
account = Proc.new { choose(*delimiters) + call(description) }
|
37
|
+
account_money = Proc.new do
|
38
|
+
sprintf("%.02f", (float * range(5,10) + 1) * choose(1, -1))
|
39
|
+
end
|
40
|
+
account_line = Proc.new do
|
41
|
+
call(account) + \
|
42
|
+
choose(*delimiters) + \
|
43
|
+
currency + \
|
44
|
+
choose(*currency_delimiters) + \
|
45
|
+
call(account_money) + \
|
46
|
+
choose(*comments)
|
47
|
+
end
|
48
|
+
ledger = "#{date}#{choose(*types)}#{choose(*codes)}#{call(description)}\n"
|
49
|
+
range(1,5).times do
|
50
|
+
ledger += "#{call(account_line)}\n"
|
51
|
+
end
|
52
|
+
ledger += "#{call(account)}\n"
|
53
|
+
ledger += choose(*single_line_comments) + "\n"
|
54
|
+
ledger
|
55
|
+
end
|
56
|
+
end.check(1000) do |s|
|
57
|
+
filter_format = lambda { |n| [n['date'], n['desc'], n['name'], sprintf("%.02f", n['amount'])] }
|
58
|
+
headers = %w[date code desc name currency amount type commend]
|
59
|
+
safe_s = Shellwords.escape(s)
|
60
|
+
|
61
|
+
lp_csv = Reckon::LedgerParser.new(s, date_format: '%Y-%m-%d').to_csv.join("\n")
|
62
|
+
actual = CSV.parse(lp_csv, headers: headers).map(&filter_format)
|
63
|
+
|
64
|
+
ledger_csv = `echo #{safe_s} | ledger csv --date-format '%Y-%m-%d' -f - `
|
65
|
+
expected = CSV.parse(ledger_csv.gsub('\"', '""'), headers: headers).map(&filter_format)
|
66
|
+
expected.length.times do |i|
|
67
|
+
expect(actual[i]).to eq(expected[i])
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
it 'should filter block comments' do
|
73
|
+
ledger = <<HERE
|
74
|
+
1970/11/01 Dinner should show up
|
75
|
+
Assets:Checking -123.00
|
76
|
+
Expenses:Restaurants
|
77
|
+
|
78
|
+
comment
|
79
|
+
|
80
|
+
1970/11/01 Lunch should NOT show up
|
81
|
+
Assets:Checking -12.00
|
82
|
+
Expenses:Restaurants
|
83
|
+
|
84
|
+
end comment
|
85
|
+
HERE
|
86
|
+
l = Reckon::LedgerParser.new(ledger)
|
87
|
+
expect(l.entries.length).to eq(1)
|
88
|
+
expect(l.entries.first[:desc]).to eq('Dinner should show up')
|
89
|
+
|
90
|
+
end
|
91
|
+
|
92
|
+
it 'should transaction comments' do
|
93
|
+
ledger = <<HERE
|
94
|
+
2020-03-27 AMZN Mktp USX999H3203; Shopping; Sale
|
95
|
+
Expenses:Household $82.77
|
96
|
+
Liabilities:ChaseSapphire -$81.77
|
97
|
+
# END FINANCE SCRIPT OUTPUT Thu 02 Apr 2020 12:05:54 PM EDT
|
98
|
+
HERE
|
99
|
+
l = Reckon::LedgerParser.new(ledger)
|
100
|
+
expect(l.entries.first[:accounts].map { |n| n[:name] }).to eq(['Expenses:Household', 'Liabilities:ChaseSapphire'])
|
101
|
+
expect(l.entries.first[:accounts].size).to eq(2)
|
102
|
+
expect(l.entries.length).to eq(1)
|
103
|
+
end
|
104
|
+
|
15
105
|
it "should ignore non-standard entries" do
|
16
106
|
@ledger.entries.length.should == 7
|
17
107
|
end
|
18
108
|
|
19
109
|
it "should parse entries correctly" do
|
20
|
-
@ledger.entries.first[:desc].should == "
|
21
|
-
@ledger.entries.first[:date].should == "2004-05-01"
|
110
|
+
@ledger.entries.first[:desc].should == "Checking balance"
|
111
|
+
@ledger.entries.first[:date].should == Date.parse("2004-05-01")
|
22
112
|
@ledger.entries.first[:accounts].first[:name].should == "Assets:Bank:Checking"
|
23
113
|
@ledger.entries.first[:accounts].first[:amount].should == 1000
|
24
114
|
@ledger.entries.first[:accounts].last[:name].should == "Equity:Opening Balances"
|
25
115
|
@ledger.entries.first[:accounts].last[:amount].should == -1000
|
26
116
|
|
27
|
-
@ledger.entries.last[:desc].should == "
|
28
|
-
@ledger.entries.last[:date].should == "2004/05/27"
|
117
|
+
@ledger.entries.last[:desc].should == "Credit card company"
|
118
|
+
@ledger.entries.last[:date].should == Date.parse("2004/05/27")
|
29
119
|
@ledger.entries.last[:accounts].first[:name].should == "Liabilities:MasterCard"
|
30
120
|
@ledger.entries.last[:accounts].first[:amount].should == 20.24
|
31
121
|
@ledger.entries.last[:accounts].last[:name].should == "Assets:Bank:Checking"
|
@@ -35,14 +125,14 @@ describe Reckon::LedgerParser do
|
|
35
125
|
|
36
126
|
describe "balance" do
|
37
127
|
it "it should balance out missing account values" do
|
38
|
-
@ledger.balance
|
128
|
+
@ledger.send(:balance, [
|
39
129
|
{ :name => "Account1", :amount => 1000 },
|
40
130
|
{ :name => "Account2", :amount => nil }
|
41
131
|
]).should == [ { :name => "Account1", :amount => 1000 }, { :name => "Account2", :amount => -1000 } ]
|
42
132
|
end
|
43
133
|
|
44
134
|
it "it should balance out missing account values" do
|
45
|
-
@ledger.balance
|
135
|
+
@ledger.send(:balance, [
|
46
136
|
{ :name => "Account1", :amount => 1000 },
|
47
137
|
{ :name => "Account2", :amount => 100 },
|
48
138
|
{ :name => "Account3", :amount => -200 },
|
@@ -56,7 +146,7 @@ describe Reckon::LedgerParser do
|
|
56
146
|
end
|
57
147
|
|
58
148
|
it "it should work on normal values too" do
|
59
|
-
@ledger.balance
|
149
|
+
@ledger.send(:balance, [
|
60
150
|
{ :name => "Account1", :amount => 1000 },
|
61
151
|
{ :name => "Account2", :amount => -1000 }
|
62
152
|
]).should == [ { :name => "Account1", :amount => 1000 }, { :name => "Account2", :amount => -1000 } ]
|
data/spec/reckon/money_spec.rb
CHANGED
@@ -8,79 +8,92 @@ require 'reckon'
|
|
8
8
|
describe Reckon::Money do
|
9
9
|
describe "from_s" do
|
10
10
|
it "should handle currency indicators" do
|
11
|
-
Reckon::Money::from_s( "$2.00" ).
|
12
|
-
Reckon::Money::from_s(
|
13
|
-
Reckon::Money::from_s(
|
11
|
+
expect(Reckon::Money::from_s( "$2.00" )).to eq(2.00)
|
12
|
+
expect(Reckon::Money::from_s("-$1025.67")).to eq(-1025.67)
|
13
|
+
expect(Reckon::Money::from_s("$-1025.67")).to eq(-1025.67)
|
14
14
|
end
|
15
15
|
|
16
16
|
it "should handle the comma_separates_cents option correctly" do
|
17
|
-
Reckon::Money::from_s(
|
18
|
-
Reckon::Money::from_s(
|
19
|
-
Reckon::Money::from_s(
|
17
|
+
expect(Reckon::Money::from_s("$2,00", :comma_separates_cents => true)).to eq(2.00)
|
18
|
+
expect(Reckon::Money::from_s("-$1025,67", :comma_separates_cents => true )).to eq(-1025.67)
|
19
|
+
expect(Reckon::Money::from_s("$-1025,67", :comma_separates_cents => true )).to eq(-1025.67)
|
20
20
|
end
|
21
21
|
|
22
22
|
it "should return 0 for an empty string" do
|
23
|
-
Reckon::Money::from_s(
|
23
|
+
expect(Reckon::Money::from_s("")).to eq(0)
|
24
24
|
end
|
25
25
|
|
26
26
|
it "should handle 1000 indicators correctly" do
|
27
|
-
Reckon::Money::from_s(
|
28
|
-
Reckon::Money::from_s(
|
27
|
+
expect(Reckon::Money::from_s("$2.000,00", :comma_separates_cents => true)).to eq(2000.00)
|
28
|
+
expect(Reckon::Money::from_s("-$1,025.67")).to eq(-1025.67)
|
29
29
|
end
|
30
30
|
|
31
31
|
it "should keep numbers together" do
|
32
|
-
Reckon::Money::from_s(
|
32
|
+
expect(Reckon::Money::from_s("1A1")).to eq(1)
|
33
33
|
end
|
34
34
|
|
35
35
|
it "should prefer numbers with precision of two" do
|
36
|
-
Reckon::Money::from_s(
|
37
|
-
Reckon::Money::from_s(
|
36
|
+
expect(Reckon::Money::from_s("1A2.00")).to eq(2)
|
37
|
+
expect(Reckon::Money::from_s("2.00A1")).to eq(2)
|
38
38
|
end
|
39
39
|
|
40
40
|
it "should handle arbitrary prefixes and postfixes" do
|
41
|
-
Reckon::Money::from_s(
|
42
|
-
Reckon::Money::from_s(
|
43
|
-
Reckon::Money::from_s(
|
41
|
+
expect(Reckon::Money::from_s("AB1.00C")).to eq(1)
|
42
|
+
expect(Reckon::Money::from_s("AB0C")).to eq(0)
|
43
|
+
expect(Reckon::Money::from_s("AB-2.00C")).to eq(-2)
|
44
44
|
end
|
45
45
|
|
46
46
|
it "should return nil if no numbers are found" do
|
47
|
-
Reckon::Money::from_s(
|
47
|
+
expect(Reckon::Money::from_s("BAC")).to be_nil()
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
51
|
describe "pretty" do
|
52
52
|
it "work with negative and positive numbers" do
|
53
|
-
Reckon::Money.new(
|
54
|
-
Reckon::Money.new(
|
53
|
+
expect(Reckon::Money.new(-20.00).pretty).to eq("-$20.00")
|
54
|
+
expect(Reckon::Money.new(1558.52).pretty).to eq(" $1558.52")
|
55
55
|
end
|
56
56
|
|
57
57
|
it "work with other currencies such as €" do
|
58
|
-
Reckon::Money.new(
|
59
|
-
Reckon::Money.new(
|
58
|
+
expect(Reckon::Money.new(-20.00, currency: "€", suffixed: false).pretty).to eq("-€20.00")
|
59
|
+
expect(Reckon::Money.new(1558.52, currency: "€", suffixed: false).pretty).to eq(" €1558.52")
|
60
60
|
end
|
61
61
|
|
62
62
|
it "work with suffixed currencies such as SEK" do
|
63
|
-
Reckon::Money.new( -20.00, :currency => "SEK", :suffixed => true ).pretty.
|
64
|
-
Reckon::Money.new( 1558.52, :currency => "SEK", :suffixed => true ).pretty.
|
63
|
+
expect(Reckon::Money.new( -20.00, :currency => "SEK", :suffixed => true ).pretty).to eq("-20.00 SEK")
|
64
|
+
expect(Reckon::Money.new( 1558.52, :currency => "SEK", :suffixed => true ).pretty).to eq(" 1558.52 SEK")
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
68
|
describe "likelihood" do
|
69
69
|
it "should return the likelihood that a string represents money" do
|
70
|
-
Reckon::Money::likelihood( "$20.00" ).
|
70
|
+
expect(Reckon::Money::likelihood( "$20.00" )).to eq(65)
|
71
|
+
end
|
72
|
+
|
73
|
+
it "should return neutral for empty string" do
|
74
|
+
expect(Reckon::Money::likelihood("")).to eq(0)
|
75
|
+
end
|
76
|
+
|
77
|
+
it "should recognize non-us currencies" do
|
78
|
+
expect(Reckon::Money::likelihood("£480.00")).to eq(30)
|
79
|
+
expect(Reckon::Money::likelihood("£1.480,00")).to eq(30)
|
80
|
+
end
|
81
|
+
|
82
|
+
it 'should not identify date columns as money' do
|
83
|
+
expect(Reckon::Money::likelihood("22.01.2014")).to eq(0)
|
71
84
|
end
|
72
85
|
end
|
73
86
|
|
74
87
|
describe "equality" do
|
75
88
|
it "should be comparable to other money" do
|
76
|
-
Reckon::Money.new(
|
77
|
-
Reckon::Money.new(
|
78
|
-
Reckon::Money.new(
|
89
|
+
expect(Reckon::Money.new(2.0)).to eq(Reckon::Money.new(2.0))
|
90
|
+
expect(Reckon::Money.new(1.0)).to be <= Reckon::Money.new(2.0)
|
91
|
+
expect(Reckon::Money.new(3.0)).to be > Reckon::Money.new(2.0)
|
79
92
|
end
|
80
93
|
it "should be comparable to other float" do
|
81
|
-
Reckon::Money.new(
|
82
|
-
Reckon::Money.new(
|
83
|
-
Reckon::Money.new(
|
94
|
+
expect(Reckon::Money.new(2.0)).to eq(2.0)
|
95
|
+
expect(Reckon::Money.new(1.0)).to be <= 2.0
|
96
|
+
expect(Reckon::Money.new(3.0)).to be > 2.0
|
84
97
|
end
|
85
98
|
end
|
86
99
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -3,4 +3,26 @@ require 'rspec'
|
|
3
3
|
require 'reckon'
|
4
4
|
|
5
5
|
RSpec.configure do |config|
|
6
|
+
config.before(:all, &:silence_output)
|
7
|
+
config.after(:all, &:enable_output)
|
8
|
+
def fixture_path(file)
|
9
|
+
File.expand_path(File.join(File.dirname(__FILE__), "data_fixtures", file))
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
public
|
14
|
+
|
15
|
+
# Redirects stderr and stout to /dev/null.txt
|
16
|
+
def silence_output
|
17
|
+
# Store the original stderr and stdout in order to restore them later
|
18
|
+
@original_stdout = $stdout
|
19
|
+
|
20
|
+
# Redirect stderr and stdout
|
21
|
+
$stdout = File.new(File.join(File.dirname(__FILE__), 'test_log.txt'), 'w')
|
22
|
+
end
|
23
|
+
|
24
|
+
# Replace stderr and stdout so anything else is output correctly
|
25
|
+
def enable_output
|
26
|
+
$stdout = @original_stdout
|
27
|
+
@original_stdout = nil
|
6
28
|
end
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reckon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Cantino
|
8
8
|
- BlackEdder
|
9
|
+
- Ben Prew
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date:
|
13
|
+
date: 2020-06-05 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: rspec
|
@@ -26,19 +27,47 @@ dependencies:
|
|
26
27
|
- !ruby/object:Gem::Version
|
27
28
|
version: 1.2.9
|
28
29
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
30
|
+
name: pry
|
30
31
|
requirement: !ruby/object:Gem::Requirement
|
31
32
|
requirements:
|
32
33
|
- - ">="
|
33
34
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
35
|
-
type: :
|
35
|
+
version: 0.12.2
|
36
|
+
type: :development
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 0.12.2
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: rantly
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - '='
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 1.2.0
|
50
|
+
type: :development
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - '='
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 1.2.0
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: github_changelog_generator
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
type: :development
|
36
65
|
prerelease: false
|
37
66
|
version_requirements: !ruby/object:Gem::Requirement
|
38
67
|
requirements:
|
39
68
|
- - ">="
|
40
69
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
70
|
+
version: '0'
|
42
71
|
- !ruby/object:Gem::Dependency
|
43
72
|
name: chronic
|
44
73
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,6 +110,20 @@ dependencies:
|
|
81
110
|
- - ">="
|
82
111
|
- !ruby/object:Gem::Version
|
83
112
|
version: 1.4.2
|
113
|
+
- !ruby/object:Gem::Dependency
|
114
|
+
name: rchardet
|
115
|
+
requirement: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: 1.8.0
|
120
|
+
type: :runtime
|
121
|
+
prerelease: false
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: 1.8.0
|
84
127
|
description: Reckon automagically converts CSV files for use with the command-line
|
85
128
|
accounting tool Ledger. It also helps you to select the correct accounts associated
|
86
129
|
with the CSV data using Bayesian machine learning.
|
@@ -95,7 +138,7 @@ files:
|
|
95
138
|
- ".ruby-gemset"
|
96
139
|
- ".ruby-version"
|
97
140
|
- ".travis.yml"
|
98
|
-
-
|
141
|
+
- CHANGELOG.md
|
99
142
|
- Gemfile
|
100
143
|
- Gemfile.lock
|
101
144
|
- LICENSE
|
@@ -104,12 +147,43 @@ files:
|
|
104
147
|
- bin/reckon
|
105
148
|
- lib/reckon.rb
|
106
149
|
- lib/reckon/app.rb
|
150
|
+
- lib/reckon/cosine_similarity.rb
|
107
151
|
- lib/reckon/csv_parser.rb
|
152
|
+
- lib/reckon/date_column.rb
|
108
153
|
- lib/reckon/ledger_parser.rb
|
154
|
+
- lib/reckon/logger.rb
|
109
155
|
- lib/reckon/money.rb
|
156
|
+
- lib/reckon/version.rb
|
110
157
|
- reckon.gemspec
|
158
|
+
- spec/data_fixtures/51-sample.csv
|
159
|
+
- spec/data_fixtures/51-tokens.yml
|
160
|
+
- spec/data_fixtures/73-sample.csv
|
161
|
+
- spec/data_fixtures/73-tokens.yml
|
162
|
+
- spec/data_fixtures/73-transactions.ledger
|
163
|
+
- spec/data_fixtures/85-date-example.csv
|
164
|
+
- spec/data_fixtures/austrian_example.csv
|
165
|
+
- spec/data_fixtures/bom_utf8_file.csv
|
166
|
+
- spec/data_fixtures/broker_canada_example.csv
|
167
|
+
- spec/data_fixtures/chase.csv
|
168
|
+
- spec/data_fixtures/danish_kroner_nordea_example.csv
|
169
|
+
- spec/data_fixtures/english_date_example.csv
|
111
170
|
- spec/data_fixtures/extratofake.csv
|
171
|
+
- spec/data_fixtures/french_example.csv
|
172
|
+
- spec/data_fixtures/german_date_example.csv
|
173
|
+
- spec/data_fixtures/harder_date_example.csv
|
174
|
+
- spec/data_fixtures/ing.csv
|
175
|
+
- spec/data_fixtures/intuit_mint_example.csv
|
176
|
+
- spec/data_fixtures/invalid_header_example.csv
|
177
|
+
- spec/data_fixtures/inversed_credit_card.csv
|
178
|
+
- spec/data_fixtures/nationwide.csv
|
179
|
+
- spec/data_fixtures/simple.csv
|
180
|
+
- spec/data_fixtures/some_other.csv
|
181
|
+
- spec/data_fixtures/spanish_date_example.csv
|
182
|
+
- spec/data_fixtures/suntrust.csv
|
183
|
+
- spec/data_fixtures/test_money_column.csv
|
112
184
|
- spec/data_fixtures/tokens.yaml
|
185
|
+
- spec/data_fixtures/two_money_columns.csv
|
186
|
+
- spec/data_fixtures/yyyymmdd_date_example.csv
|
113
187
|
- spec/reckon/app_spec.rb
|
114
188
|
- spec/reckon/csv_parser_spec.rb
|
115
189
|
- spec/reckon/date_column_spec.rb
|
@@ -119,7 +193,8 @@ files:
|
|
119
193
|
- spec/spec.opts
|
120
194
|
- spec/spec_helper.rb
|
121
195
|
homepage: https://github.com/cantino/reckon
|
122
|
-
licenses:
|
196
|
+
licenses:
|
197
|
+
- MIT
|
123
198
|
metadata: {}
|
124
199
|
post_install_message:
|
125
200
|
rdoc_options: []
|
@@ -136,20 +211,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
211
|
- !ruby/object:Gem::Version
|
137
212
|
version: '0'
|
138
213
|
requirements: []
|
139
|
-
|
140
|
-
rubygems_version: 2.4.6
|
214
|
+
rubygems_version: 3.1.2
|
141
215
|
signing_key:
|
142
216
|
specification_version: 4
|
143
217
|
summary: Utility for interactively converting and labeling CSV files for the Ledger
|
144
218
|
accounting tool.
|
145
|
-
test_files:
|
146
|
-
- spec/data_fixtures/extratofake.csv
|
147
|
-
- spec/data_fixtures/tokens.yaml
|
148
|
-
- spec/reckon/app_spec.rb
|
149
|
-
- spec/reckon/csv_parser_spec.rb
|
150
|
-
- spec/reckon/date_column_spec.rb
|
151
|
-
- spec/reckon/ledger_parser_spec.rb
|
152
|
-
- spec/reckon/money_column_spec.rb
|
153
|
-
- spec/reckon/money_spec.rb
|
154
|
-
- spec/spec.opts
|
155
|
-
- spec/spec_helper.rb
|
219
|
+
test_files: []
|