ocr_space 0.2.1 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -0
- data/lib/ocr_space/from_file.rb +1 -0
- data/lib/ocr_space/from_url.rb +1 -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: 962b3d391926a5a1f282811823e69ecd968f6f48
|
4
|
+
data.tar.gz: c693a622879ec79439822e63eeb324ee67247f77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd89b5a9765ae51f1ef70ba61601249a478c490dfe36979e5ebb19ebdd8b148609960cb635fac1fdea2d78644e9c7eed10a10454f64c63ed3e16ba2c58e6beaf
|
7
|
+
data.tar.gz: 8ec39b07146935ea50311b482b53a2f34bf49a6d11e1d592e67e3ca73e5c79ce0846421aca77f51f4cc6e6489842bb409c87787fb019dbfa0e2a8b7351607dfe
|
data/README.md
CHANGED
@@ -29,6 +29,8 @@ Hosted at [rubygems.org](https://rubygems.org/gems/ocr_space)
|
|
29
29
|
#To convert images from url
|
30
30
|
|
31
31
|
```ruby
|
32
|
+
require 'ocr_space'
|
33
|
+
|
32
34
|
result = OcrSpace::FromUrl.new(apikey: "YOUR API KEY", url: "http://i.stack.imgur.com/vrkIj.png")
|
33
35
|
|
34
36
|
puts result #Raw result
|
@@ -43,6 +45,8 @@ puts result.text_data #Clean result
|
|
43
45
|
#To convert images from file upload
|
44
46
|
|
45
47
|
```ruby
|
48
|
+
require 'ocr_space'
|
49
|
+
|
46
50
|
result = OcrSpace::FromFile.new(apikey: "YOUR API KEY", files: "./vrkIj.png")
|
47
51
|
|
48
52
|
puts result #Raw result
|
@@ -66,6 +70,18 @@ $ "I am curious about \r\narea-filling text \r\nrendering options \r\n"
|
|
66
70
|
#NOTE
|
67
71
|
For commandline interface to work you will have to set ENV variable 'ocr_api_key' to your apikey.
|
68
72
|
|
73
|
+
```
|
74
|
+
$ export ocr_api_key='YOUR API KEY'
|
75
|
+
```
|
76
|
+
Also if you set env variable then you don't need to include apikey in your ruby scripts. You can just do the following -
|
77
|
+
|
78
|
+
```ruby
|
79
|
+
result = OcrSpace::FromFile.new(files: "./vrkIj.png") #for File based
|
80
|
+
|
81
|
+
result = OcrSpace::FromUrl.new(url: "http://i.stack.imgur.com/vrkIj.png") #for URL based
|
82
|
+
|
83
|
+
```
|
84
|
+
|
69
85
|
#Optional
|
70
86
|
|
71
87
|
You can also pass in Optional attributes
|
data/lib/ocr_space/from_file.rb
CHANGED
data/lib/ocr_space/from_url.rb
CHANGED
data/lib/ocr_space/version.rb
CHANGED