hledger-forecast 1.1.0 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37dbc9f011b6a43fa1d186e92dfb77c3c184cdb4a7cc5ef690a77d53c57f4722
4
- data.tar.gz: e71185f0ad678b45f1ffa155c89c491bd37d36307d845dd023b823db6ced42d4
3
+ metadata.gz: 21be14ce391292a910e85657b5dd77e6e40648fc06a0c6ffe5d6aaabb8a4a52d
4
+ data.tar.gz: 7764b423d46ed8f656af7907374fbdac9519a63b92de6ac0fd8e85db80fdc715
5
5
  SHA512:
6
- metadata.gz: d25713fb91fde68daaa07f6809a3c567afc18864a759e47fd032c31cd78cbe195eba2919deff4547d2fe6888e032f7394af4012aea839d1fc6b3d4ee7b1e94bf
7
- data.tar.gz: 363185c38d788ae91528dc1fde6e21201fc19bec673848202a43589c36c8be3f6fe8e54cb367bfb8652ea286eda6513ab38e86e20aef99f8b7011cb1351fed3b
6
+ metadata.gz: c52628b6b7259c24710e797a38f3bb01cfe85e4c199b26284d0e4aea7a2b2ec42f588cd69607b8a642c6637fd2d9d4a0d625c08e59c522f79bcd04a9a692b69d
7
+ data.tar.gz: dc8e7808c9f51444ffbc3d09af9845a2d971f9750cdd07c8210f56e6b84274e3b8a6159d5c09c718586b58d2655d8f463e97471dffe503bc4dddf26ca6557c2f
data/.gitignore CHANGED
@@ -18,3 +18,4 @@ pkg/*
18
18
  # Misc
19
19
  test_output.journal
20
20
  todo.md
21
+ .vscode
data/README.md CHANGED
@@ -92,6 +92,7 @@ The available options are:
92
92
  -f, --forecast FILE The path to the FORECAST yaml file to summarize
93
93
  -r, --roll-up PERIOD The period to roll-up your forecasts into. One of:
94
94
  [yearly], [half-yearly], [quarterly], [monthly], [weekly], [daily]
95
+ -v, --verbose Show additional information in the summary
95
96
  -h, --help Show this help message
96
97
 
97
98
  ## :gear: Configuration
@@ -124,22 +124,27 @@ module HledgerForecast
124
124
  options[:roll_up] = rollup
125
125
  end
126
126
 
127
- opts.on("--from DATE",
128
- "Include transactions that start FROM a given DATE [yyyy-mm-dd]") do |from|
129
- options[:from] = from
127
+ opts.on("-v", "--verbose",
128
+ "Show additional information in the summary") do |_|
129
+ options[:verbose] = true
130
130
  end
131
131
 
132
- opts.on("--to DATE",
133
- "Include transactions that run TO a given DATE [yyyy-mm-dd]") do |to|
134
- options[:to] = to
135
- end
136
-
137
- opts.on("-s", "--scenario \"NAMES\"",
138
- "Include transactions from given scenarios, e.g.:",
139
- "\"base, rennovation, car purchase\"") do |_scenario|
140
- # Loop through scenarios, seperated by a comma
141
- options[:scenario] = {}
142
- end
132
+ # opts.on("--from DATE",
133
+ # "Include transactions that start FROM a given DATE [yyyy-mm-dd]") do |from|
134
+ # options[:from] = from
135
+ # end
136
+ #
137
+ # opts.on("--to DATE",
138
+ # "Include transactions that run TO a given DATE [yyyy-mm-dd]") do |to|
139
+ # options[:to] = to
140
+ # end
141
+
142
+ # opts.on("-s", "--scenario \"NAMES\"",
143
+ # "Include transactions from given scenarios, e.g.:",
144
+ # "\"base, rennovation, car purchase\"") do |_scenario|
145
+ # # Loop through scenarios, seperated by a comma
146
+ # options[:scenario] = {}
147
+ # end
143
148
 
144
149
  opts.on_tail("-h", "--help", "Show this help message") do
145
150
  puts opts
@@ -42,8 +42,15 @@ module HledgerForecast
42
42
  total = 0
43
43
  items.each do |item|
44
44
  total += item[:amount]
45
- @table.add_row [{ value: item[:category], colspan: 2, alignment: :left },
46
- { value: format_amount(item[:amount]), alignment: :right }]
45
+
46
+ if @settings[:verbose]
47
+ @table.add_row [{ value: item[:category], alignment: :left },
48
+ { value: item[:description], alignment: :left },
49
+ { value: format_amount(item[:amount]), alignment: :right }]
50
+ else
51
+ @table.add_row [{ value: item[:category], colspan: 2, alignment: :left },
52
+ { value: format_amount(item[:amount]), alignment: :right }]
53
+ end
47
54
  end
48
55
 
49
56
  @table.add_row [{ value: "TOTAL".bold, colspan: 2, alignment: :left },
@@ -1,3 +1,3 @@
1
1
  module HledgerForecast
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hledger-forecast
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oli Morris
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-20 00:00:00.000000000 Z
11
+ date: 2023-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize