chupa-text 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +6 -0
- data/lib/chupa-text/decomposers/office-open-xml-workbook.rb +14 -4
- data/lib/chupa-text/version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97113be234e69a94d3710448d9468f4138fc7aa686275201c9f2441ed6fd217b
|
4
|
+
data.tar.gz: be11f97456e1511bb91fed287485a456c9a8db7fafc4357d8cf0784dfb444a0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f4ebd3d6fdb67b2f70e73841325586e80b2a5ff94178d4f25066072890af613571939d2bfb0f12ff1465a4c4cacbcccc6a0a50bda0a5514ca247709f0b45d09
|
7
|
+
data.tar.gz: 3ae71d85db976f28f731df669fe2eddfc93d5cb94a176e01ef2298b5a4a5eaf5848fc33a1c10a70c286f00ca41773b00f3962bef0cf635399fa315b58bba4937
|
data/doc/text/news.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2019 Kouhei
|
1
|
+
# Copyright (C) 2019-2022 Sutou Kouhei <kou@clear-code.com>
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -119,7 +119,8 @@ module ChupaText
|
|
119
119
|
def initialize(sheet)
|
120
120
|
@sheet = sheet
|
121
121
|
@cell_type = nil
|
122
|
-
@
|
122
|
+
@in_is = false # inline string
|
123
|
+
@in_v = false # value
|
123
124
|
end
|
124
125
|
|
125
126
|
def start_element(uri, local_name, qname, attributes)
|
@@ -129,7 +130,8 @@ module ChupaText
|
|
129
130
|
@sheet << []
|
130
131
|
when "c"
|
131
132
|
@cell_type = parse_cell_type(attributes["t"])
|
132
|
-
|
133
|
+
when "is"
|
134
|
+
@in_is = true
|
133
135
|
when "v"
|
134
136
|
@in_v = true
|
135
137
|
end
|
@@ -140,6 +142,8 @@ module ChupaText
|
|
140
142
|
case local_name
|
141
143
|
when "c"
|
142
144
|
@cell_type = nil
|
145
|
+
when "is"
|
146
|
+
@in_is = false
|
143
147
|
when "v"
|
144
148
|
@in_v = false
|
145
149
|
end
|
@@ -174,8 +178,14 @@ module ChupaText
|
|
174
178
|
end
|
175
179
|
end
|
176
180
|
|
181
|
+
def have_text?
|
182
|
+
return true if @in_is
|
183
|
+
return true if @in_v
|
184
|
+
false
|
185
|
+
end
|
186
|
+
|
177
187
|
def add_column(text)
|
178
|
-
return unless
|
188
|
+
return unless have_text?
|
179
189
|
case @cell_type
|
180
190
|
when :shared_string
|
181
191
|
@sheet.last << Integer(text, 10)
|
data/lib/chupa-text/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2013-
|
1
|
+
# Copyright (C) 2013-2020 Sutou Kouhei <kou@clear-code.com>
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -15,5 +15,5 @@
|
|
15
15
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
16
|
|
17
17
|
module ChupaText
|
18
|
-
VERSION = "1.3.
|
18
|
+
VERSION = "1.3.3"
|
19
19
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chupa-text
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sutou Kouhei
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: archive-zip
|
@@ -304,7 +304,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
304
304
|
- !ruby/object:Gem::Version
|
305
305
|
version: '0'
|
306
306
|
requirements: []
|
307
|
-
rubygems_version: 3.
|
307
|
+
rubygems_version: 3.4.0.dev
|
308
308
|
signing_key:
|
309
309
|
specification_version: 4
|
310
310
|
summary: ChupaText is an extensible text extractor. You can plug your custom text
|