ocr_space 0.2.8.4 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ocr_space/from_file.rb +4 -4
- data/lib/ocr_space/from_url.rb +1 -1
- data/lib/ocr_space/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d6af41320b1f019a718b0a4bdf82635ff45fb83
|
4
|
+
data.tar.gz: fde10be5e3f5c2305ef6ee40bcfa55e562180349
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43e8bbbc932dc61a035e38948151ef853d07b87910a706fe81559ebb7eacd757875cc54bbd03da9fae6e93bc034f2bfc6401006d31063dfd8d36bd1f25cd92c5
|
7
|
+
data.tar.gz: 68adbde17acbb1fa00fd87050a51c85db4fb8c6e6bdeb913694d9da9f45033301fb61bf249e77f38e4e650ffc3b827377ea5ae8b3ab9825482e0f5331bbe2c98
|
data/lib/ocr_space/from_file.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
require 'ocr_space/file_post'
|
2
2
|
|
3
3
|
module OcrSpace
|
4
|
-
class
|
4
|
+
class File
|
5
5
|
attr_reader :data
|
6
|
-
def initialize(apikey: ENV['ocr_api_key'], language: 'eng', isOverlayRequired: false,
|
7
|
-
@
|
6
|
+
def initialize(apikey: ENV['ocr_api_key'], language: 'eng', isOverlayRequired: false, file: nil)
|
7
|
+
@files = File.new(file)
|
8
8
|
@data = OcrSpace::FilePost.post('/parse/image',
|
9
9
|
body: { apikey: apikey,
|
10
10
|
language: language,
|
11
11
|
isOverlayRequired: isOverlayRequired,
|
12
|
-
|
12
|
+
file: @files })
|
13
13
|
@data = @data.parsed_response['ParsedResults']
|
14
14
|
end
|
15
15
|
|
data/lib/ocr_space/from_url.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'httparty'
|
2
2
|
|
3
3
|
module OcrSpace
|
4
|
-
class
|
4
|
+
class Url
|
5
5
|
attr_reader :data
|
6
6
|
def initialize(apikey: ENV['ocr_api_key'], language: 'eng', isOverlayRequired: false, url: nil, ocr_space: 'https://api.ocr.space/parse/image')
|
7
7
|
@data = HTTParty.post(ocr_space,
|
data/lib/ocr_space/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ocr_space
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0
|
4
|
+
version: '1.0'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Suyesh Bhandari
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
version: '0'
|
150
150
|
requirements: []
|
151
151
|
rubyforge_project:
|
152
|
-
rubygems_version: 2.6.
|
152
|
+
rubygems_version: 2.6.10
|
153
153
|
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: Free Online OCR for Ruby - Convert images to text
|