rtesseract 0.0.8 → 0.0.9
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.
- data/Rakefile +1 -1
- data/lib/rtesseract.rb +3 -3
- data/rtesseract.gemspec +3 -3
- metadata +5 -5
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.
|
8
|
+
gem.version = '0.0.9'
|
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
@@ -5,7 +5,7 @@ require "rtesseract/errors"
|
|
5
5
|
require "rtesseract/mixed"
|
6
6
|
|
7
7
|
class RTesseract
|
8
|
-
VERSION = '0.0.
|
8
|
+
VERSION = '0.0.9'
|
9
9
|
attr_accessor :options
|
10
10
|
attr_writer :lang
|
11
11
|
attr_writer :psm
|
@@ -119,7 +119,7 @@ class RTesseract
|
|
119
119
|
generate_uid
|
120
120
|
tmp_file = Pathname.new(Dir::tmpdir).join("#{@uid}_#{@source.basename}")
|
121
121
|
tmp_image = image_to_tiff
|
122
|
-
`#{@command} #{tmp_image} #{tmp_file.to_s} #{lang} #{psm} #{config_file} #{clear_console_output}`
|
122
|
+
`#{@command} '#{tmp_image}' '#{tmp_file.to_s}' #{lang} #{psm} #{config_file} #{clear_console_output}`
|
123
123
|
@value = File.read("#{tmp_file.to_s}.txt").to_s
|
124
124
|
@uid = nil
|
125
125
|
remove_file([tmp_image,"#{tmp_file.to_s}.txt"])
|
@@ -142,7 +142,7 @@ class RTesseract
|
|
142
142
|
def to_s_without_spaces
|
143
143
|
to_s.gsub(" ","").gsub("\n","").gsub("\r","")
|
144
144
|
end
|
145
|
-
|
145
|
+
|
146
146
|
private
|
147
147
|
def choose_processor!
|
148
148
|
if @processor.to_s == "mini_magick"
|
data/rtesseract.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rtesseract}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.9"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = [%q{Danilo Jeremias da Silva}]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-12-01}
|
13
13
|
s.description = %q{Ruby library for working with the Tesseract OCR.}
|
14
14
|
s.email = %q{dannnylo@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
|
|
39
39
|
]
|
40
40
|
s.homepage = %q{http://github.com/dannnylo/rtesseract}
|
41
41
|
s.require_paths = [%q{lib}]
|
42
|
-
s.rubygems_version = %q{1.8.
|
42
|
+
s.rubygems_version = %q{1.8.3}
|
43
43
|
s.summary = %q{Ruby library for working with the Tesseract OCR.}
|
44
44
|
|
45
45
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rtesseract
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 9
|
10
|
+
version: 0.0.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Danilo Jeremias da Silva
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-12-01 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: jeweler
|
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
requirements: []
|
122
122
|
|
123
123
|
rubyforge_project:
|
124
|
-
rubygems_version: 1.8.
|
124
|
+
rubygems_version: 1.8.3
|
125
125
|
signing_key:
|
126
126
|
specification_version: 3
|
127
127
|
summary: Ruby library for working with the Tesseract OCR.
|