data_science_theater_3000 0.0.3.4 → 0.0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Screenshot-1.png +0 -0
- data/doc/sample.png +0 -0
- data/lib/data_science_theater_3000.rb +14 -0
- data/lib/data_science_theater_3000/version.rb +1 -1
- metadata +5 -3
data/Screenshot-1.png
ADDED
Binary file
|
data/doc/sample.png
ADDED
Binary file
|
@@ -56,6 +56,20 @@ module DataScienceTheater3000
|
|
56
56
|
#times = make_hashy(response)
|
57
57
|
end
|
58
58
|
|
59
|
+
# Specify path to an image file and return the discernable text.
|
60
|
+
#
|
61
|
+
# @param [String] file_path
|
62
|
+
# @return [String] text discerned from image
|
63
|
+
def self.file2text file_path
|
64
|
+
url = "http://www.datasciencetoolkit.org"
|
65
|
+
c = Curl::Easy.new( url + '/file2text')
|
66
|
+
c.multipart_form_post = true
|
67
|
+
c.http_post(Curl::PostField.file('inputfile', file_path))
|
68
|
+
|
69
|
+
response = c.body_str
|
70
|
+
end
|
71
|
+
|
72
|
+
|
59
73
|
def self.make_hashy response
|
60
74
|
ActiveSupport::JSON.decode(response)
|
61
75
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data_science_theater_3000
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-01-20 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: curb
|
16
|
-
requirement: &
|
16
|
+
requirement: &22482180 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *22482180
|
25
25
|
description: Ruby interface to issue Data Science Toolkit API calls.
|
26
26
|
email:
|
27
27
|
- tad@isotope11.com
|
@@ -33,7 +33,9 @@ files:
|
|
33
33
|
- Gemfile
|
34
34
|
- README.md
|
35
35
|
- Rakefile
|
36
|
+
- Screenshot-1.png
|
36
37
|
- data_science_theater_3000.gemspec
|
38
|
+
- doc/sample.png
|
37
39
|
- lib/data_science_theater_3000.rb
|
38
40
|
- lib/data_science_theater_3000/version.rb
|
39
41
|
homepage: http://github.com/rthbound/data_science_theater_3000
|