lucabook 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 210dddde58c2e020242fb4faf8643045b0c46862b050f27dd16c8108baee94d8
4
- data.tar.gz: 95e39bcc78e77c3191e622e64d0b8f3c07738833aeccfadb030348297a38efa8
3
+ metadata.gz: bc7304203698a38027accd15c692ae271e6e35cadecf4382a07fec093e2498b1
4
+ data.tar.gz: 12294609a4306921c552a7bbd1695fce2a10f1d689016c4b479ec3aa6880441f
5
5
  SHA512:
6
- metadata.gz: 18caa0109f726e8b94d911e39c1f4c5b6d19bbbc7393f1c07f3baadfb197d6b760f8286d13be4fc2ceb393c37690902bd96405031bfa89aa8696f3933f17e55b
7
- data.tar.gz: 15fbecd2cf597ae95d33a6af114fe32ca181bb039fb8d442737303c53ead969c2075a034bfd0ac077bae21587cfc1f623f23108f32fda2e89b542d20bf15d8ae
6
+ metadata.gz: f01f815713717ad5d12b10dd741560ca179c49865cd596e836ed60c699a2d3ea7dead69802d5f207f3dacde11ea51b54a99120ffdbce182825be4c28412c52ad
7
+ data.tar.gz: c36a05d9b0cae4ec3ae33ad8a07e139b66b642858a940cd68e6d688f2939d9154c618a93060278b75f7115713e5317d5edd9e49ecab1d1198f85ecc2f31ee90f
data/exe/luca-book CHANGED
@@ -20,6 +20,7 @@ class LucaCmd
20
20
 
21
21
  def self.list(args, params)
22
22
  args = gen_range(params[:n]) if args.empty?
23
+ params[:col_order] = %w(date diff balance counter_code note code id no)
23
24
  if params['code']
24
25
  if params['headers']
25
26
  render(LucaBook::ListByHeader.term(*args, code: params['code'], header: params['headers']).list_by_code, params)
@@ -140,9 +141,10 @@ class LucaCmd
140
141
  if dat.length == 1 and dat.first['balance'] == 0
141
142
  puts 'ⓘ Initial balance & records empty in the specified term.'
142
143
  else
143
- column_ord = %w(date diff balance counter_code note code id no)
144
- LucaSupport::View.nushell(dat, column_ord)
144
+ LucaSupport::View.nushell(dat, :expand, params[:col_order] || [])
145
145
  end
146
+ when 'explore'
147
+ LucaSupport::View.nushell(dat, :explore, params[:col_order] || [])
146
148
  else
147
149
  puts YAML.dump(dat)
148
150
  end
@@ -189,6 +191,7 @@ when /journals?/, 'j'
189
191
  opt.on('--customer', 'categorize by x-customer header') { |_v| params['headers'] = 'x-customer' }
190
192
  opt.on('-n VAL', 'report count') { |v| params[:n] = v.to_i }
191
193
  opt.on('--nu', 'show table in nushell') { |_v| params[:output] = 'nu' }
194
+ opt.on('--explore', 'explore table in nushell') { |_v| params[:output] = 'explore' }
192
195
  opt.on('-o', '--output VAL', 'output serialized data') { |v| params[:output] = v }
193
196
  opt.on('--html', 'output journals html') { |_v| params['render'] = :html }
194
197
  opt.on('--pdf', 'output journals PDF') { |_v| params['render'] = :pdf }
@@ -214,6 +217,7 @@ when /journals?/, 'j'
214
217
  opt.on('-r', '--recursive', 'include subaccounts') { |_v| params[:recursive] = true }
215
218
  opt.on('-n VAL', 'report count') { |v| params[:n] = v.to_i }
216
219
  opt.on('--nu', 'show table in nushell') { |_v| params[:output] = 'nu' }
220
+ opt.on('--explore', 'explore table in nushell') { |_v| params[:output] = 'explore' }
217
221
  opt.on('-o', '--output VAL', 'output serialized data') { |v| params[:output] = v }
218
222
  args = opt.parse!(ARGV)
219
223
  LucaCmd::Journal.stats(args, params)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LucaBook
4
- VERSION = '0.4.4'
4
+ VERSION = '0.4.5'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lucabook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chuma Takahiro
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-11 00:00:00.000000000 Z
11
+ date: 2023-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lucarecord