ocr_space 2.0 → 2.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: 482aa09d94f5f2a4eb0bffba5b4a3a4e3eebb2ba
4
- data.tar.gz: 343592d8b308393c5fd62b516b754cd4af7cabb9
3
+ metadata.gz: 1209e9f604146297bca5c5a382d32231026396c1
4
+ data.tar.gz: 25acb8ade98ac094e9cdc387756364ba515b9af3
5
5
  SHA512:
6
- metadata.gz: 7b08e263106cd8c8b04e6bba34eccaf5e1727892794a954f168a3d28f4dad951469175a58fb59cb1de1e390392702e76af92365e6454f6bb104034d3c0e54c6f
7
- data.tar.gz: a14245907adc60dc9493b7018ee72578e413180f5600dddd573f4a141083f27994520c8da287084f540ea2a4764b84534e21d146cda0cf7006dd798cf2792293
6
+ metadata.gz: ec007815f8b4ef564a1e153b9b72e621beb7a34a4c498c25edfac37aab6dc1ef9945c28a6c97fdb7b5e39e383e938646920c895d939d216d014145b20629db32
7
+ data.tar.gz: b7ac2508555f4a4032d984fd4a926fb2cd1aadeabf160a0e3c7caefa72d0e7a5e9bb93264cd4703b0684575fb99c66d213b11a3778eec9b4c86e9323c828657f
data/README.md CHANGED
@@ -24,6 +24,13 @@ Or install it yourself as:
24
24
 
25
25
  Hosted at [rubygems.org](https://rubygems.org/gems/ocr_space)
26
26
 
27
+ #ENV Variables (Optional)
28
+ setting env variables with api key is optional but for commandline interface to work you will have to set ENV variable 'ocr_api_key' to your apikey. For more details on Command line interface, scroll to the bottom of this page.
29
+
30
+ ```
31
+ $ export ocr_api_key='YOUR API KEY'
32
+ ```
33
+
27
34
  ## Usage
28
35
 
29
36
  ![Nicola Tesla](http://bit.ly/2ih9aXt)
@@ -36,12 +43,6 @@ require 'ocr_space'
36
43
  resource = OcrSpace::Resource.new(apikey: "YOUR API KEY")
37
44
  #By default it picks up ocr_api_key='YOUR API KEY' from your env variables
38
45
  ```
39
- #ENV Variables (Optional)
40
- setting env variables with api key is optional but for commandline interface to work you will have to set ENV variable 'ocr_api_key' to your apikey. For more details on Command line interface, scroll to the bottom of this page.
41
-
42
- ```
43
- $ export ocr_api_key='YOUR API KEY'
44
- ```
45
46
 
46
47
  #To convert images from url
47
48
 
data/lib/ocr_space.rb CHANGED
@@ -10,10 +10,11 @@ module OcrSpace
10
10
 
11
11
  def initialize(apikey: ENV['ocr_api_key'])
12
12
  @api_key = apikey
13
+ @data = nil
13
14
  end
14
15
 
15
16
  def text_data
16
- data[0]['ParsedText'].delete("\n").delete("\r").strip
17
+ @data[0]['ParsedText'].delete("\n").delete("\r").strip
17
18
  end
18
19
  end
19
20
  end
@@ -1,3 +1,3 @@
1
1
  module OcrSpace
2
- VERSION = '2.0'.freeze
2
+ VERSION = '2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocr_space
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.0'
4
+ version: '2.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suyesh Bhandari