arquivo 0.2.6 → 0.2.7
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/arquivo.rb +1 -1
- data/lib/arquivo/dir.rb +12 -7
- data/lib/arquivo/noise.rb +0 -3
- data/lib/arquivo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 89558d48120f776a51fec71ba71944581249e3ad23838737c1d424166e47e42b
|
|
4
|
+
data.tar.gz: 4cf0050da0b5b1e69a655802981a78bc01d1398eff08d2ab9d8ce7b5d7ef8fb1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dfb1d7d6a3361c2b9ed6308481a8a87d3252f6be230a2bc2446080915883968dac1d8e9f14eeb372ba2f90fdfb33ef098f1b0fc748c8af49c0344e5f1022987c
|
|
7
|
+
data.tar.gz: a4c1d2d860a1f48552e4f0015cf2a8c42e69cfa387615f2776c399b5216233eb2907f06004ce53f04ce3031d34e7a9d18fc438fb73dc377070d24f0e942919ac
|
data/Gemfile.lock
CHANGED
data/lib/arquivo.rb
CHANGED
|
@@ -67,7 +67,7 @@ module Arquivo
|
|
|
67
67
|
desc 'big', 'processa dados bigquery c118'
|
|
68
68
|
# processa bigquery c118
|
|
69
69
|
def big
|
|
70
|
-
C118dir.new('
|
|
70
|
+
C118dir.new('/home/c118', options).processa_big
|
|
71
71
|
end
|
|
72
72
|
|
|
73
73
|
desc 'dir PASTA', 'processa faturas/recibos/extratos/minutas ' \
|
data/lib/arquivo/dir.rb
CHANGED
|
@@ -68,15 +68,20 @@ module Arquivo
|
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
def processa_big
|
|
71
|
-
|
|
71
|
+
# sheet c118-contas
|
|
72
|
+
dg = '1PbiMrtTtqGztZMhe3AiJbDS6NQE9o3hXebnQEFdt954'
|
|
73
|
+
ano = c118_sheets.get_spreadsheet_values(dg, 'cdb!AJ2').values
|
|
74
|
+
ins = c118_sheets.get_spreadsheet_values(dg, 'cbd!AJ:AJ').values
|
|
75
|
+
puts ano
|
|
76
|
+
puts ins
|
|
77
|
+
|
|
72
78
|
# This uses Application Default Credentials to authenticate.
|
|
73
79
|
# @see https://cloud.google.com/bigquery/docs/authentication/getting-started
|
|
74
|
-
bigquery = Google::Cloud::Bigquery.new
|
|
75
|
-
|
|
76
|
-
r
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
end
|
|
80
|
+
# bigquery = Google::Cloud::Bigquery.new
|
|
81
|
+
# r = bigquery.query 'select * from arquivo.bal order by 1 desc limit 10'
|
|
82
|
+
# r.each do |row|
|
|
83
|
+
# puts "#{row[:data]}: #{row[:documento]}"
|
|
84
|
+
# end
|
|
80
85
|
end
|
|
81
86
|
|
|
82
87
|
# @return [String] proximo item dentro da pasta
|
data/lib/arquivo/noise.rb
CHANGED
|
@@ -44,15 +44,12 @@ module Arquivo
|
|
|
44
44
|
# @return [C118dir] pasta de documentos c118
|
|
45
45
|
def initialize(dir, opt)
|
|
46
46
|
c = Dir.glob(File.join(dir, '*'))
|
|
47
|
-
puts c
|
|
48
47
|
@local = dir
|
|
49
|
-
puts @local
|
|
50
48
|
@items = c.each
|
|
51
49
|
@nome = File.basename(dir, File.extname(dir)) + '-' +
|
|
52
50
|
Date.today.strftime('%Y%m%d')
|
|
53
51
|
@opcoes = opt
|
|
54
52
|
@contem = obtem_conteudo(c)
|
|
55
|
-
puts @contem
|
|
56
53
|
end
|
|
57
54
|
|
|
58
55
|
# Agrupa conteudo duma pasta segundo tipos de documentos validos
|
data/lib/arquivo/version.rb
CHANGED