ocr_space 2.0 → 2.1
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.
- checksums.yaml +4 -4
- data/README.md +7 -6
- data/lib/ocr_space.rb +2 -1
- data/lib/ocr_space/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1209e9f604146297bca5c5a382d32231026396c1
|
4
|
+
data.tar.gz: 25acb8ade98ac094e9cdc387756364ba515b9af3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|

|
@@ -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
|
data/lib/ocr_space/version.rb
CHANGED