rtesseract 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -65,4 +65,4 @@ It's very simple to use rtesseract:
65
65
 
66
66
  == Copyright
67
67
 
68
- Copyright (c) 2010 Danilo Jeremias da Silva. See LICENSE for details.
68
+ Copyright (c) 2012 Danilo Jeremias da Silva. See LICENSE for details.
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ begin
5
5
  require 'jeweler'
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "rtesseract"
8
- gem.version = '0.0.12'
8
+ gem.version = '0.0.13'
9
9
  gem.summary = "Ruby library for working with the Tesseract OCR."
10
10
  gem.description = "Ruby library for working with the Tesseract OCR."
11
11
  gem.email = "dannnylo@gmail.com"
data/lib/rtesseract.rb CHANGED
@@ -6,7 +6,7 @@ require "rtesseract/errors"
6
6
  require "rtesseract/mixed"
7
7
 
8
8
  class RTesseract
9
- VERSION = '0.0.12'
9
+ VERSION = '0.0.13'
10
10
  attr_accessor :options
11
11
  attr_writer :lang
12
12
  attr_writer :psm
@@ -142,7 +142,7 @@ class RTesseract
142
142
  generate_uid
143
143
  tmp_file = Pathname.new(Dir::tmpdir).join("#{@uid}_#{@source.basename}")
144
144
  tmp_image = image_to_tiff
145
- `#{@command} '#{tmp_image}' '#{tmp_file.to_s}' #{lang} #{psm} #{config_file} #{clear_console_output}`
145
+ `#{@command} "#{tmp_image}" "#{tmp_file.to_s}" #{lang} #{psm} #{config_file} #{clear_console_output}`
146
146
  @value = File.read("#{tmp_file.to_s}.txt").to_s
147
147
  @uid = nil
148
148
  remove_file([tmp_image,"#{tmp_file.to_s}.txt"])
@@ -155,7 +155,7 @@ class RTesseract
155
155
  generate_uid
156
156
  tmp_file = Pathname.new(Dir::tmpdir).join("#{@uid}_#{@source.basename}")
157
157
  tmp_image = image_from_blob(blob)
158
- `#{@command} '#{tmp_image}' '#{tmp_file.to_s}' #{lang} #{psm} #{config_file} #{clear_console_output}`
158
+ `#{@command} "#{tmp_image}" "#{tmp_file.to_s}" #{lang} #{psm} #{config_file} #{clear_console_output}`
159
159
  @value = File.read("#{tmp_file.to_s}.txt").to_s
160
160
  @uid = nil
161
161
  remove_file([tmp_image,"#{tmp_file.to_s}.txt"])
data/rtesseract.gemspec CHANGED
@@ -4,14 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{rtesseract}
8
- s.version = "0.0.12"
7
+ s.name = "rtesseract"
8
+ s.version = "0.0.13"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Danilo Jeremias da Silva"]
12
- s.date = %q{2012-01-31}
13
- s.description = %q{Ruby library for working with the Tesseract OCR.}
14
- s.email = %q{dannnylo@gmail.com}
12
+ s.date = "2012-05-03"
13
+ s.description = "Ruby library for working with the Tesseract OCR."
14
+ s.email = "dannnylo@gmail.com"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
17
  "README.rdoc"
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
29
29
  "rtesseract.gemspec",
30
30
  "test/helper.rb",
31
31
  "test/images/mixed.tif",
32
+ "test/images/test with spaces.tif",
32
33
  "test/images/test.bmp",
33
34
  "test/images/test.jpg",
34
35
  "test/images/test.png",
@@ -37,10 +38,10 @@ Gem::Specification.new do |s|
37
38
  "test/test_mixed.rb",
38
39
  "test/test_rtesseract.rb"
39
40
  ]
40
- s.homepage = %q{http://github.com/dannnylo/rtesseract}
41
+ s.homepage = "http://github.com/dannnylo/rtesseract"
41
42
  s.require_paths = ["lib"]
42
- s.rubygems_version = %q{1.6.2}
43
- s.summary = %q{Ruby library for working with the Tesseract OCR.}
43
+ s.rubygems_version = "1.8.11"
44
+ s.summary = "Ruby library for working with the Tesseract OCR."
44
45
 
45
46
  if s.respond_to? :specification_version then
46
47
  s.specification_version = 3
Binary file
@@ -17,6 +17,7 @@ class TestRtesseract < Test::Unit::TestCase
17
17
  should "translate image to text" do
18
18
  assert_equal RTesseract.new(@image_tiff).to_s_without_spaces , "43ZZ"
19
19
  assert_equal RTesseract.new(@path.join("images","test1.tif").to_s).to_s_without_spaces , "V2V4"
20
+ assert_equal RTesseract.new(@path.join("images","test with spaces.tif").to_s).to_s_without_spaces , "V2V4"
20
21
  end
21
22
 
22
23
  should "translate images .png, .jpg, .bmp" do
metadata CHANGED
@@ -1,58 +1,78 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rtesseract
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.12
3
+ version: !ruby/object:Gem::Version
4
+ hash: 5
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 13
10
+ version: 0.0.13
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Danilo Jeremias da Silva
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-01-31 00:00:00.000000000 -02:00
13
- default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-05-03 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
16
21
  name: jeweler
17
- requirement: &72864320 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
18
24
  none: false
19
- requirements:
20
- - - ! '>='
21
- - !ruby/object:Gem::Version
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 7
29
+ segments:
30
+ - 1
31
+ - 4
32
+ - 0
22
33
  version: 1.4.0
23
34
  type: :development
24
- prerelease: false
25
- version_requirements: *72864320
26
- - !ruby/object:Gem::Dependency
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
27
37
  name: thoughtbot-shoulda
28
- requirement: &72864050 !ruby/object:Gem::Requirement
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
29
40
  none: false
30
- requirements:
31
- - - ! '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ hash: 3
45
+ segments:
46
+ - 0
47
+ version: "0"
34
48
  type: :development
35
- prerelease: false
36
- version_requirements: *72864050
37
- - !ruby/object:Gem::Dependency
49
+ version_requirements: *id002
50
+ - !ruby/object:Gem::Dependency
38
51
  name: rmagick
39
- requirement: &72863440 !ruby/object:Gem::Requirement
52
+ prerelease: false
53
+ requirement: &id003 !ruby/object:Gem::Requirement
40
54
  none: false
41
- requirements:
42
- - - ! '>='
43
- - !ruby/object:Gem::Version
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ hash: 37
59
+ segments:
60
+ - 2
61
+ - 10
62
+ - 1
44
63
  version: 2.10.1
45
64
  type: :runtime
46
- prerelease: false
47
- version_requirements: *72863440
65
+ version_requirements: *id003
48
66
  description: Ruby library for working with the Tesseract OCR.
49
67
  email: dannnylo@gmail.com
50
68
  executables: []
69
+
51
70
  extensions: []
52
- extra_rdoc_files:
71
+
72
+ extra_rdoc_files:
53
73
  - LICENSE
54
74
  - README.rdoc
55
- files:
75
+ files:
56
76
  - .document
57
77
  - LICENSE
58
78
  - README.rdoc
@@ -65,6 +85,7 @@ files:
65
85
  - rtesseract.gemspec
66
86
  - test/helper.rb
67
87
  - test/images/mixed.tif
88
+ - test/images/test with spaces.tif
68
89
  - test/images/test.bmp
69
90
  - test/images/test.jpg
70
91
  - test/images/test.png
@@ -72,29 +93,38 @@ files:
72
93
  - test/images/test1.tif
73
94
  - test/test_mixed.rb
74
95
  - test/test_rtesseract.rb
75
- has_rdoc: true
76
96
  homepage: http://github.com/dannnylo/rtesseract
77
97
  licenses: []
98
+
78
99
  post_install_message:
79
100
  rdoc_options: []
80
- require_paths:
101
+
102
+ require_paths:
81
103
  - lib
82
- required_ruby_version: !ruby/object:Gem::Requirement
104
+ required_ruby_version: !ruby/object:Gem::Requirement
83
105
  none: false
84
- requirements:
85
- - - ! '>='
86
- - !ruby/object:Gem::Version
87
- version: '0'
88
- required_rubygems_version: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ hash: 3
110
+ segments:
111
+ - 0
112
+ version: "0"
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
89
114
  none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ hash: 3
119
+ segments:
120
+ - 0
121
+ version: "0"
94
122
  requirements: []
123
+
95
124
  rubyforge_project:
96
- rubygems_version: 1.6.2
125
+ rubygems_version: 1.8.11
97
126
  signing_key:
98
127
  specification_version: 3
99
128
  summary: Ruby library for working with the Tesseract OCR.
100
129
  test_files: []
130
+