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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 33a913d24abd0991f9e04f34fe70d83337d9e6ddf10cbadbd70a1b4fa97dc168
4
- data.tar.gz: f8d6eaebe0eca2c9aca0ff54db1d9a2a5bdec9123d831e90f5473b5821192d66
3
+ metadata.gz: 97113be234e69a94d3710448d9468f4138fc7aa686275201c9f2441ed6fd217b
4
+ data.tar.gz: be11f97456e1511bb91fed287485a456c9a8db7fafc4357d8cf0784dfb444a0e
5
5
  SHA512:
6
- metadata.gz: 40ef4f99f4c99c979a4b08a602d208c492dd95db811e63a2f02ace07e4b4629452b63421951ddf738df0989891cf9bb3c0e01a6d34dbf9a35830addc6e8b008b
7
- data.tar.gz: 0b30577f67c860d55eeb32ed8ee09fed1b0b6530620e10142ce59526478e0665a2806cd236893b6555cdd2cce676a21f20d3b0ac33d0dc2d52a617d1c4d80941
6
+ metadata.gz: 4f4ebd3d6fdb67b2f70e73841325586e80b2a5ff94178d4f25066072890af613571939d2bfb0f12ff1465a4c4cacbcccc6a0a50bda0a5514ca247709f0b45d09
7
+ data.tar.gz: 3ae71d85db976f28f731df669fe2eddfc93d5cb94a176e01ef2298b5a4a5eaf5848fc33a1c10a70c286f00ca41773b00f3962bef0cf635399fa315b58bba4937
data/doc/text/news.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # News
2
2
 
3
+ ## 1.3.3: 2022-02-01
4
+
5
+ ### Improvements
6
+
7
+ * `xlsx`: Added support for inline string.
8
+
3
9
  ## 1.3.2: 2020-05-01
4
10
 
5
11
  ### Improvements
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2019 Kouhei Sutou <kou@clear-code.com>
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
- @in_v = false
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
- # when "is" # TODO
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 @in_v
188
+ return unless have_text?
179
189
  case @cell_type
180
190
  when :shared_string
181
191
  @sheet.last << Integer(text, 10)
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013-2019 Kouhei Sutou <kou@clear-code.com>
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.2"
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.2
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: 2020-05-01 00:00:00.000000000 Z
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.2.0.pre1
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