chupa-text-decomposer-pdf 1.0.0 → 1.0.1

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
  SHA1:
3
- metadata.gz: 1f536d0590910cc072e5dc47308413752872d9e0
4
- data.tar.gz: 21cd886ed411e604ad60026ad82ddd738650e6ce
3
+ metadata.gz: 6e31d3498186c960a9dae07539e83f77ffa5b995
4
+ data.tar.gz: 6ecc6033cd1420eb5c7dba3540cf9b4bdca569e9
5
5
  SHA512:
6
- metadata.gz: 5063792608deea8b42f210ab05b276d0305cb50b4098328d8b85745c1115429a087030aabd05898ea1046e556d270703189ab5f1445af24e7b96523ea9e910d1
7
- data.tar.gz: 5481c44dfca54ab40c90d11c555e37926fc466a72728b1a81e41d3bdc53cd0912322588d5b9a0b1f102c896aa7828449bca9a9f8f1fbccb9b84c12cd04d77d1e
6
+ metadata.gz: 661698768712b75f81cccef8df76cdd86ea76ef95bb38320d0e713c2a2a0a68cc222c62c64219baad59b72788bcb5ff5e0fee0277ef2f74125c3a6e24d1a6ca6
7
+ data.tar.gz: 54d47d4bbd031c02f8774200177b29c5c112a574f812bc68ee43d20019a00e461e8ca4aad955f6c50913e28578656ffdaa12fdca33e04d603df32f9c79662c62
@@ -22,14 +22,15 @@ end
22
22
 
23
23
  Gem::Specification.new do |spec|
24
24
  spec.name = "chupa-text-decomposer-pdf"
25
- spec.version = "1.0.0"
25
+ spec.version = "1.0.1"
26
26
  spec.homepage = "https://github.com/ranguba/chupa-text-decomposer-pdf"
27
27
  spec.authors = ["Kouhei Sutou"]
28
28
  spec.email = ["kou@clear-code.com"]
29
29
  readme = File.read("README.md", :encoding => "UTF-8")
30
30
  entries = readme.split(/^\#\#\s(.*)$/)
31
31
  description = clean_white_space.call(entries[entries.index("Description") + 1])
32
- spec.summary, spec.description, = description.split(/\n\n+/, 3)
32
+ spec.summary = description.split(/\n\n+/, 2).first
33
+ spec.description = description
33
34
  spec.license = "LGPLv2.1 or later"
34
35
  spec.files = ["#{spec.name}.gemspec"]
35
36
  spec.files += ["README.md", "LICENSE.txt", "Rakefile", "Gemfile"]
@@ -1,5 +1,11 @@
1
1
  # News
2
2
 
3
+ ## 1.0.1: 2014-02-16
4
+
5
+ ### Improvements
6
+
7
+ * Added a new line between pages.
8
+
3
9
  ## 1.0.0: 2014-01-05
4
10
 
5
11
  The first release!!!
@@ -32,7 +32,10 @@ module ChupaText
32
32
  document = Poppler::Document.new(data.body)
33
33
  text = ""
34
34
  document.each do |page|
35
- text << page.get_text
35
+ page_text = page.get_text
36
+ next if page_text.empty?
37
+ text << "\n" unless text.empty?
38
+ text << page_text
36
39
  end
37
40
  text_data = TextData.new(text)
38
41
  text_data.uri = data.uri
@@ -125,7 +125,7 @@ class TestPDF < Test::Unit::TestCase
125
125
 
126
126
  sub_test_case("multi pages") do
127
127
  def test_body
128
- assert_equal(["Page1Page2"], decompose.collect(&:body))
128
+ assert_equal(["Page1\nPage2"], decompose.collect(&:body))
129
129
  end
130
130
 
131
131
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chupa-text-decomposer-pdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-05 00:00:00.000000000 Z
11
+ date: 2014-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chupa-text
@@ -109,6 +109,9 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  description: |
112
+ This is a ChupaText decomposer plugin for to extract text and
113
+ meta-data from PDF.
114
+
112
115
  You can use `pdf` decomposer.
113
116
  email:
114
117
  - kou@clear-code.com