hledger-forecast 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dec0f161d9d99f109fb449763f74d8ed4362deefe14996a540df934a6b318f08
4
- data.tar.gz: e88100cca81d8a444b1f7d9189e2d7149d03f0bcda7d133c09a393d7447b0e77
3
+ metadata.gz: 9772d5b27c6f2d9b34bd63b32fe03451b74d9174d9144b33821ca80615c25855
4
+ data.tar.gz: d4590bb0b96d7d507fb5ebc7c97c0bdd0186cc2cefeca431033352ab69166f56
5
5
  SHA512:
6
- metadata.gz: c07c049aded3d72ce1479c123d57d3e9b76a04318a6f18ee7ebff1505ff239fab6d6ca09fbe6bb6adaf9e2f26628d728bba89010ed6dcbf3b25eb49ffdbd3a89
7
- data.tar.gz: 19cd01fbfb3113228fe504b7e3984986400cd8c4bb1e6f3b49ef9e34c9c0c0e59ac9098f73878869d8856413e4959978f869f4add3227d3d9a5ea90c311abaa9
6
+ metadata.gz: 739a2154d80fca8055cce38203a7b024215653e2f7b601916d963dae01e5a644e54910169a04608e8629ed1724eb0f23451b0d77b19f41e27b78f4e8e41b2400
7
+ data.tar.gz: 04dd3dd1ec44b2db053f7d25b8357c2eab54b801d6ad4875a92ca0965892143c037f4b6e54a85480080158e500e31547d2c93d2dc0f1197c9e5213044ae64281
@@ -1,4 +1,4 @@
1
- name: Continuous Integration
1
+ name: Tests
2
2
 
3
3
  on:
4
4
  pull_request:
@@ -12,7 +12,7 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
  strategy:
14
14
  matrix:
15
- ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2']
15
+ ruby-version: ['3.0', '3.1', '3.2']
16
16
 
17
17
  steps:
18
18
  - uses: actions/checkout@v3
data/.gitignore CHANGED
@@ -1,4 +1,4 @@
1
1
  *.gem
2
- *.journal
2
+ forecast.journal
3
3
  forecast.yml
4
4
  todo.md
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hledger-forecast (0.1.0)
4
+ hledger-forecast (0.1.1)
5
5
  highline (~> 2.1.0)
6
6
  money (~> 6.16.0)
7
7
 
@@ -31,6 +31,7 @@ GEM
31
31
 
32
32
  PLATFORMS
33
33
  arm64-darwin-21
34
+ x86_64-linux
34
35
 
35
36
  DEPENDENCIES
36
37
  hledger-forecast!
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Hledger-Forecast
2
2
 
3
- ![Tests](https://github.com/olimorris/hledger-forecast/workflows/ci/badge.svg)
3
+ [![Tests](https://github.com/olimorris/hledger-forecast/actions/workflows/ci.yml/badge.svg)](https://github.com/olimorris/hledger-forecast/actions/workflows/ci.yml)
4
4
 
5
5
  > **Warning**: This is still in the early stages of development and the API is likely to change
6
6
 
@@ -47,6 +47,8 @@ where `transactions.journal` might be your bank transactions (your "actuals") an
47
47
 
48
48
  ### A simple config file
49
49
 
50
+ > **Note**: See the [example.yml](https://github.com/olimorris/hledger-forecast/blob/main/example.yml) file for all of the options
51
+
50
52
  Firstly, create a `yml` file which will contain the transactions you'd like to forecast:
51
53
 
52
54
  ```yaml
data/example.yml ADDED
@@ -0,0 +1,40 @@
1
+ monthly:
2
+ - account: "[Assets:Bank]"
3
+ date: "2023-03-01"
4
+ transactions:
5
+ - amount: 1000.00
6
+ category: "[Expenses:Mortgage]"
7
+ description: Mortgage
8
+ - amount: 500.00
9
+ category: "[Expenses:Food]"
10
+ description: Food
11
+
12
+ quarterly:
13
+ - account: "[Assets:Bank]"
14
+ date: "2023-04-01"
15
+ transactions:
16
+ - amount: -1000.00
17
+ category: "[Income:Bonus]"
18
+ description: Bonus
19
+
20
+ yearly:
21
+ - account: "[Assets:Bank]"
22
+ date: "2023-04-01"
23
+ transactions:
24
+ - amount: -2000.00
25
+ category: "[Income:Bonus]"
26
+ description: Annual Bonus
27
+
28
+ once:
29
+ - account: "[Assets:Bank]"
30
+ date: "2024-01-01"
31
+ transactions:
32
+ - amount: 5000.00
33
+ category: "[Expenses:Car]"
34
+ description: Forecast new car cost
35
+
36
+ settings:
37
+ currency: GBP
38
+ show_symbol: false
39
+ sign_before_symbol: true
40
+ thousands_separator: false
@@ -1,3 +1,3 @@
1
1
  module HledgerForecast
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -0,0 +1,32 @@
1
+ 2023-02-01 * Opening balance
2
+ Assets:Bank £1,000.00
3
+ Equity:Opening balance
4
+
5
+ 2023-02-05 * Mortgage payment
6
+ Expenses:Mortgage £1,500.00
7
+ Assets:Bank
8
+
9
+ 2023-03-01 * Mortgage
10
+ [Expenses:Mortgage] £2,000.00
11
+ [Assets:Bank]
12
+
13
+ 2023-03-01 * Food
14
+ [Expenses:Food] £100.00
15
+ [Assets:Bank]
16
+
17
+ 2023-04-01 * Mortgage
18
+ [Expenses:Mortgage] £2,000.00
19
+ [Assets:Bank]
20
+
21
+ 2023-04-01 * Food
22
+ [Expenses:Food] £100.00
23
+ [Assets:Bank]
24
+
25
+ 2023-05-01 * Mortgage
26
+ [Expenses:Mortgage] £2,000.00
27
+ [Assets:Bank]
28
+
29
+ 2023-05-01 * Food
30
+ [Expenses:Food] £100.00
31
+ [Assets:Bank]
32
+
@@ -0,0 +1,48 @@
1
+ 2023-02-01 * Opening balance
2
+ Assets:Bank £1,000.00
3
+ Equity:Opening balance
4
+
5
+ 2023-02-05 * Mortgage payment
6
+ Expenses:Mortgage £1,500.00
7
+ Assets:Bank
8
+
9
+ 2023-03-01 * Mortgage
10
+ [Expenses:Mortgage] £2,000.00
11
+ [Assets:Bank]
12
+
13
+ 2023-03-01 * Food
14
+ [Expenses:Food] £100.00
15
+ [Assets:Bank]
16
+
17
+ 2023-04-01 * Mortgage
18
+ [Expenses:Mortgage] £2,000.00
19
+ [Assets:Bank]
20
+
21
+ 2023-04-01 * Food
22
+ [Expenses:Food] £100.00
23
+ [Assets:Bank]
24
+
25
+ 2023-05-01 * Mortgage
26
+ [Expenses:Mortgage] £2,000.00
27
+ [Assets:Bank]
28
+
29
+ 2023-05-01 * Food
30
+ [Expenses:Food] £100.00
31
+ [Assets:Bank]
32
+
33
+ 2023-06-01 * Mortgage
34
+ [Expenses:Mortgage] £2,000.00
35
+ [Assets:Bank]
36
+
37
+ 2023-06-01 * Food
38
+ [Expenses:Food] £100.00
39
+ [Assets:Bank]
40
+
41
+ 2023-07-01 * Food
42
+ [Expenses:Food] £100.00
43
+ [Assets:Bank]
44
+
45
+ 2023-08-01 * Food
46
+ [Expenses:Food] £100.00
47
+ [Assets:Bank]
48
+
@@ -0,0 +1,40 @@
1
+ 2023-02-01 * Opening balance
2
+ Assets:Bank £1,000.00
3
+ Equity:Opening balance
4
+
5
+ 2023-02-05 * Mortgage payment
6
+ Expenses:Mortgage £1,500.00
7
+ Assets:Bank
8
+
9
+ 2023-03-01 * Mortgage
10
+ [Expenses:Mortgage] £2,000.00
11
+ [Assets:Bank]
12
+
13
+ 2023-03-01 * Food
14
+ [Expenses:Food] £100.00
15
+ [Assets:Bank]
16
+
17
+ 2023-04-01 * Mortgage
18
+ [Expenses:Mortgage] £2,000.00
19
+ [Assets:Bank]
20
+
21
+ 2023-04-01 * Food
22
+ [Expenses:Food] £100.00
23
+ [Assets:Bank]
24
+
25
+ 2023-05-01 * Mortgage
26
+ [Expenses:Mortgage] £2,000.00
27
+ [Assets:Bank]
28
+
29
+ 2023-05-01 * Food
30
+ [Expenses:Food] £100.00
31
+ [Assets:Bank]
32
+
33
+ 2023-06-01 * Mortgage
34
+ [Expenses:Mortgage] £2,000.00
35
+ [Assets:Bank]
36
+
37
+ 2023-06-01 * Food
38
+ [Expenses:Food] £100.00
39
+ [Assets:Bank]
40
+
@@ -0,0 +1,20 @@
1
+ 2023-02-01 * Opening balance
2
+ Assets:Bank £1,000.00
3
+ Equity:Opening balance
4
+
5
+ 2023-02-05 * Mortgage payment
6
+ Expenses:Mortgage £1,500.00
7
+ Assets:Bank
8
+
9
+ 2023-03-01 * Mortgage
10
+ [Expenses:Mortgage] £2,000.00
11
+ [Assets:Bank]
12
+
13
+ 2023-04-01 * Mortgage
14
+ [Expenses:Mortgage] £2,000.00
15
+ [Assets:Bank]
16
+
17
+ 2023-05-01 * Mortgage
18
+ [Expenses:Mortgage] £2,000.00
19
+ [Assets:Bank]
20
+
@@ -0,0 +1,12 @@
1
+ 2023-02-01 * Opening balance
2
+ Assets:Bank £1,000.00
3
+ Equity:Opening balance
4
+
5
+ 2023-02-05 * Mortgage payment
6
+ Expenses:Mortgage £1,500.00
7
+ Assets:Bank
8
+
9
+ 2023-07-01 * New Kitchen
10
+ [Expense:House] £5,000.00
11
+ [Assets:Bank]
12
+
@@ -0,0 +1,20 @@
1
+ 2023-02-01 * Opening balance
2
+ Assets:Bank £1,000.00
3
+ Equity:Opening balance
4
+
5
+ 2023-02-05 * Mortgage payment
6
+ Expenses:Mortgage £1,500.00
7
+ Assets:Bank
8
+
9
+ 2023-04-01 * Bonus
10
+ [Income:Bonus] -£1,000.00
11
+ [Assets:Bank]
12
+
13
+ 2023-07-01 * Bonus
14
+ [Income:Bonus] -£1,000.00
15
+ [Assets:Bank]
16
+
17
+ 2023-10-01 * Bonus
18
+ [Income:Bonus] -£1,000.00
19
+ [Assets:Bank]
20
+
@@ -0,0 +1,16 @@
1
+ 2023-02-01 * Opening balance
2
+ Assets:Bank £1,000.00
3
+ Equity:Opening balance
4
+
5
+ 2023-02-05 * Mortgage payment
6
+ Expenses:Mortgage £1,500.00
7
+ Assets:Bank
8
+
9
+ 2023-04-01 * Bonus
10
+ [Income:Bonus] -£3,000.00
11
+ [Assets:Bank]
12
+
13
+ 2024-04-01 * Bonus
14
+ [Income:Bonus] -£3,000.00
15
+ [Assets:Bank]
16
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hledger-forecast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oli Morris
@@ -69,7 +69,7 @@ files:
69
69
  - LICENSE
70
70
  - README.md
71
71
  - bin/hledger-forecast
72
- - example.yaml
72
+ - example.yml
73
73
  - hledger-forecast.gemspec
74
74
  - lib/hledger_forecast.rb
75
75
  - lib/hledger_forecast/command.rb
@@ -83,10 +83,17 @@ files:
83
83
  - spec/stubs/monthly/forecast_monthly_enddate.yml
84
84
  - spec/stubs/monthly/forecast_monthly_enddate_top.yml
85
85
  - spec/stubs/monthly/forecast_monthly_modifier.yml
86
+ - spec/stubs/monthly/output_monthly.journal
87
+ - spec/stubs/monthly/output_monthly_enddate.journal
88
+ - spec/stubs/monthly/output_monthly_enddate_top.journal
89
+ - spec/stubs/monthly/output_monthly_modifier.journal
86
90
  - spec/stubs/once/forecast_once.yml
91
+ - spec/stubs/once/output_once.journal
87
92
  - spec/stubs/quarterly/forecast_quarterly.yml
93
+ - spec/stubs/quarterly/output_quarterly.journal
88
94
  - spec/stubs/transactions.journal
89
95
  - spec/stubs/yearly/forecast_yearly.yml
96
+ - spec/stubs/yearly/output_yearly.journal
90
97
  - spec/yearly_spec.rb
91
98
  homepage: https://github.com/olimorris/hledger-forecast
92
99
  licenses:
@@ -119,8 +126,15 @@ test_files:
119
126
  - spec/stubs/monthly/forecast_monthly_enddate.yml
120
127
  - spec/stubs/monthly/forecast_monthly_enddate_top.yml
121
128
  - spec/stubs/monthly/forecast_monthly_modifier.yml
129
+ - spec/stubs/monthly/output_monthly.journal
130
+ - spec/stubs/monthly/output_monthly_enddate.journal
131
+ - spec/stubs/monthly/output_monthly_enddate_top.journal
132
+ - spec/stubs/monthly/output_monthly_modifier.journal
122
133
  - spec/stubs/once/forecast_once.yml
134
+ - spec/stubs/once/output_once.journal
123
135
  - spec/stubs/quarterly/forecast_quarterly.yml
136
+ - spec/stubs/quarterly/output_quarterly.journal
124
137
  - spec/stubs/transactions.journal
125
138
  - spec/stubs/yearly/forecast_yearly.yml
139
+ - spec/stubs/yearly/output_yearly.journal
126
140
  - spec/yearly_spec.rb
data/example.yaml DELETED
@@ -1,26 +0,0 @@
1
- monthly:
2
- - date: "2023-03-01"
3
- account: "[Assets:Bank]"
4
- transactions:
5
- - description: Mortgage
6
- category: "[Expenses:Mortgage]"
7
- amount: £1,000.00
8
- - description: Food
9
- category: "[Expenses:Food]"
10
- amount: £500.00
11
-
12
- quarterly:
13
- - date: "2023-04-01"
14
- account: "[Assets:Bank]"
15
- transactions:
16
- - description: Bonus
17
- category: "[Income:Bonus]"
18
- amount: -£1,000.00
19
-
20
- yearly:
21
- - date: "2023-04-01"
22
- account: "[Assets:Bank]"
23
- transactions:
24
- - description: Annual Bonus
25
- category: "[Income:Bonus]"
26
- amount: -£2,000.00