rtesseract 3.0.3 → 3.1.2
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/.github/workflows/ci.yml +31 -0
- data/.hound.yml +3 -0
- data/.rubocop.yml +15 -3
- data/CHANGELOG.md +36 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +26 -29
- data/README.md +16 -16
- data/Rakefile +2 -0
- data/bin/console +1 -0
- data/lib/rtesseract.rb +2 -0
- data/lib/rtesseract/base.rb +4 -4
- data/lib/rtesseract/box.rb +37 -20
- data/lib/rtesseract/check.rb +2 -0
- data/lib/rtesseract/command.rb +13 -7
- data/lib/rtesseract/configuration.rb +2 -0
- data/lib/rtesseract/pdf.rb +5 -3
- data/lib/rtesseract/text.rb +2 -0
- data/lib/rtesseract/tsv.rb +5 -3
- data/lib/rtesseract/version.rb +3 -1
- data/rtesseract.gemspec +8 -9
- metadata +9 -37
- data/.travis.yml +0 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 87f85a70ab24a03a719e7726d95debeb469d822c447acc39a8adc1579c43e6d1
|
|
4
|
+
data.tar.gz: a18cd83cd4632ed5adc096f9384659f0e47a4ba33e2f8a76e804cf8140e8798b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4f6b37e1645d5f82c759e5feea081cfcf5384e2ad91423d2d04030a89ef007eb9469ecf398ba4cd2364bf2baeea4bad885866c4c41b19fa4da2c078b79cef4a6
|
|
7
|
+
data.tar.gz: bea642e1d7d2576dbdaeeb68ff730627104894d914a405a4ec2a37b8c65755f2f9c33a5091e16eaced51162725b6ea62f647b764ec838eefe3bfe4f58f461986
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on: [push]
|
|
3
|
+
jobs:
|
|
4
|
+
test:
|
|
5
|
+
runs-on: ubuntu-latest
|
|
6
|
+
strategy:
|
|
7
|
+
matrix:
|
|
8
|
+
ruby:
|
|
9
|
+
- '2.5.x'
|
|
10
|
+
- '2.6.x'
|
|
11
|
+
- '2.7.x'
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v2
|
|
14
|
+
- name: Install tesseract-ocr
|
|
15
|
+
run: |
|
|
16
|
+
sudo add-apt-repository ppa:alex-p/tesseract-ocr -y
|
|
17
|
+
sudo apt-get update -q
|
|
18
|
+
sudo apt-get install tesseract-ocr tesseract-ocr-eng ghostscript -y
|
|
19
|
+
- name: Setup Ruby
|
|
20
|
+
uses: actions/setup-ruby@v1
|
|
21
|
+
with:
|
|
22
|
+
ruby-version: ${{ matrix.ruby }}
|
|
23
|
+
- name: Bundle
|
|
24
|
+
env:
|
|
25
|
+
MTSR_RAILS_VERSION: ${{ matrix.rails }}
|
|
26
|
+
run: |
|
|
27
|
+
gem uninstall -aIx bundler
|
|
28
|
+
gem install bundler
|
|
29
|
+
bundle install --jobs 4 --retry 3
|
|
30
|
+
- name: Test
|
|
31
|
+
run: bundle exec rake
|
data/.hound.yml
ADDED
data/.rubocop.yml
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
Documentation:
|
|
2
|
-
Enabled: false
|
|
3
1
|
|
|
4
|
-
|
|
2
|
+
Layout/LineLength:
|
|
5
3
|
Max: 150
|
|
6
4
|
|
|
7
5
|
Metrics/BlockLength:
|
|
8
6
|
Max: 50
|
|
7
|
+
|
|
8
|
+
Metrics/AbcSize:
|
|
9
|
+
Max: 30
|
|
10
|
+
|
|
11
|
+
Style/Documentation:
|
|
12
|
+
Enabled: false
|
|
13
|
+
Style/HashEachMethods:
|
|
14
|
+
Enabled: true
|
|
15
|
+
|
|
16
|
+
Style/HashTransformKeys:
|
|
17
|
+
Enabled: true
|
|
18
|
+
|
|
19
|
+
Style/HashTransformValues:
|
|
20
|
+
Enabled: true
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
+
## v3.1.2
|
|
2
|
+
|
|
3
|
+
#### Added
|
|
4
|
+
|
|
5
|
+
* Added confidence for each word in box mode
|
|
6
|
+
|
|
7
|
+
## v3.1.1
|
|
8
|
+
|
|
9
|
+
#### Changed
|
|
10
|
+
|
|
11
|
+
* Changed RTesseract::Command to receive a block when success run
|
|
12
|
+
|
|
13
|
+
## v3.1.0
|
|
14
|
+
|
|
15
|
+
#### Changed
|
|
16
|
+
|
|
17
|
+
* Removed nokogi dependency.
|
|
18
|
+
|
|
19
|
+
## v3.0.4
|
|
20
|
+
|
|
21
|
+
#### Changed
|
|
22
|
+
|
|
23
|
+
* Updated dependencies by security alerts.
|
|
24
|
+
|
|
25
|
+
## v3.0.5
|
|
26
|
+
|
|
27
|
+
#### Changed
|
|
28
|
+
|
|
29
|
+
* Updated dependencies by security alerts.
|
|
30
|
+
|
|
31
|
+
## v3.0.4
|
|
32
|
+
|
|
33
|
+
#### Changed
|
|
34
|
+
|
|
35
|
+
* Updated dependencies by security alerts.
|
|
36
|
+
|
|
1
37
|
## v3.0.3
|
|
2
38
|
|
|
3
39
|
#### Changed
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,58 +1,55 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rtesseract (3.
|
|
5
|
-
nokogiri
|
|
4
|
+
rtesseract (3.1.2)
|
|
6
5
|
|
|
7
6
|
GEM
|
|
8
7
|
remote: https://rubygems.org/
|
|
9
8
|
specs:
|
|
10
|
-
coveralls (0.8.
|
|
9
|
+
coveralls (0.8.23)
|
|
11
10
|
json (>= 1.8, < 3)
|
|
12
11
|
simplecov (~> 0.16.1)
|
|
13
12
|
term-ansicolor (~> 1.3)
|
|
14
|
-
thor (
|
|
13
|
+
thor (>= 0.19.4, < 2.0)
|
|
15
14
|
tins (~> 1.6)
|
|
16
15
|
diff-lcs (1.3)
|
|
17
|
-
docile (1.3.
|
|
18
|
-
json (2.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
rspec-
|
|
26
|
-
|
|
27
|
-
rspec-core (3.8.0)
|
|
28
|
-
rspec-support (~> 3.8.0)
|
|
29
|
-
rspec-expectations (3.8.2)
|
|
16
|
+
docile (1.3.2)
|
|
17
|
+
json (2.3.0)
|
|
18
|
+
rake (13.0.1)
|
|
19
|
+
rspec (3.9.0)
|
|
20
|
+
rspec-core (~> 3.9.0)
|
|
21
|
+
rspec-expectations (~> 3.9.0)
|
|
22
|
+
rspec-mocks (~> 3.9.0)
|
|
23
|
+
rspec-core (3.9.1)
|
|
24
|
+
rspec-support (~> 3.9.1)
|
|
25
|
+
rspec-expectations (3.9.1)
|
|
30
26
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
31
|
-
rspec-support (~> 3.
|
|
32
|
-
rspec-mocks (3.
|
|
27
|
+
rspec-support (~> 3.9.0)
|
|
28
|
+
rspec-mocks (3.9.1)
|
|
33
29
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
34
|
-
rspec-support (~> 3.
|
|
35
|
-
rspec-support (3.
|
|
30
|
+
rspec-support (~> 3.9.0)
|
|
31
|
+
rspec-support (3.9.2)
|
|
36
32
|
simplecov (0.16.1)
|
|
37
33
|
docile (~> 1.1)
|
|
38
34
|
json (>= 1.8, < 3)
|
|
39
35
|
simplecov-html (~> 0.10.0)
|
|
40
36
|
simplecov-html (0.10.2)
|
|
41
|
-
|
|
37
|
+
sync (0.5.0)
|
|
38
|
+
term-ansicolor (1.7.1)
|
|
42
39
|
tins (~> 1.0)
|
|
43
|
-
thor (0.
|
|
44
|
-
tins (1.
|
|
40
|
+
thor (1.0.1)
|
|
41
|
+
tins (1.24.1)
|
|
42
|
+
sync
|
|
45
43
|
|
|
46
44
|
PLATFORMS
|
|
47
45
|
ruby
|
|
48
46
|
|
|
49
47
|
DEPENDENCIES
|
|
50
|
-
bundler (~>
|
|
48
|
+
bundler (~> 2)
|
|
51
49
|
coveralls
|
|
52
|
-
rake
|
|
53
|
-
rspec
|
|
50
|
+
rake
|
|
51
|
+
rspec
|
|
54
52
|
rtesseract!
|
|
55
|
-
simplecov
|
|
56
53
|
|
|
57
54
|
BUNDLED WITH
|
|
58
|
-
1.
|
|
55
|
+
2.1.4
|
data/README.md
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
<a href='http://badge.fury.io/rb/rtesseract'>
|
|
4
4
|
<img src="https://badge.fury.io/rb/rtesseract.png" alt="Gem Version" />
|
|
5
5
|
</a>
|
|
6
|
-
<a href='https://
|
|
7
|
-
|
|
6
|
+
<a href='https://github.com/dannnylo/rtesseract/workflows/CI/badge.svg'>
|
|
7
|
+
<img src="https://github.com/dannnylo/rtesseract/workflows/CI/badge.svg" alt="Build Status" />
|
|
8
8
|
</a>
|
|
9
9
|
<a href='https://coveralls.io/r/dannnylo/rtesseract?branch=master'>
|
|
10
10
|
<img src="https://coveralls.io/repos/dannnylo/rtesseract/badge.png?branch=master" alt="Coverage Status" />
|
|
@@ -100,20 +100,20 @@ This will preserve the image colors, pictures and structure in the generated pdf
|
|
|
100
100
|
```ruby
|
|
101
101
|
RTesseract.new('test_words.png').to_box
|
|
102
102
|
=> [
|
|
103
|
-
{:word => 'If',
|
|
104
|
-
{:word => 'you', :x_start=>69, :y_start=>17, :x_end=>100, :y_end=>31},
|
|
105
|
-
{:word => 'are', :x_start=>108, :y_start=>17, :x_end=>136, :y_end=>27},
|
|
106
|
-
{:word => 'a', :x_start=>
|
|
107
|
-
{:word => 'friend,', :x_start=>158, :y_start=>13, :x_end=>214, :y_end=>29},
|
|
108
|
-
{:word => 'you', :x_start=>51, :y_start=>39, :x_end=>82, :y_end=>53},
|
|
109
|
-
{:word => 'speak', :x_start=>90, :y_start=>35, :x_end=>140, :y_end=>53},
|
|
110
|
-
{:word => 'the', :x_start=>146, :y_start=>35, :x_end=>174, :y_end=>49},
|
|
111
|
-
{:word => 'password,', :x_start=>182, :y_start=>35, :x_end=>267, :y_end=>53},
|
|
112
|
-
{:word => 'and', :x_start=>51, :y_start=>57, :x_end=>81, :y_end=>71},
|
|
113
|
-
{:word => 'the', :x_start=>89, :y_start=>57, :x_end=>117, :y_end=>71},
|
|
114
|
-
{:word => 'doors', :x_start=>124, :y_start=>57, :x_end=>172, :y_end=>71},
|
|
115
|
-
{:word => 'will', :x_start=>180, :y_start=>57, :x_end=>208, :y_end=>71},
|
|
116
|
-
{:word => 'open.', :x_start=>216, :y_start=>61, :x_end=>263, :y_end=>75}
|
|
103
|
+
{ :word => 'If', :confidence=>89, :x_start=>52, :y_start=>13, :x_end=>63, :y_end=>27},
|
|
104
|
+
{ :word => 'you', :confidence=>96, :x_start=>69, :y_start=>17, :x_end=>100, :y_end=>31},
|
|
105
|
+
{ :word => 'are', :confidence=>92, :x_start=>108, :y_start=>17, :x_end=>136, :y_end=>27},
|
|
106
|
+
{ :word => 'a', :confidence=>92, :x_start=>133, :y_start=>8, :x_end=>147, :y_end=>35},
|
|
107
|
+
{ :word => 'friend,', :confidence=>95, :x_start=>158, :y_start=>13, :x_end=>214, :y_end=>29},
|
|
108
|
+
{ :word => 'you', :confidence=>96, :x_start=>51, :y_start=>39, :x_end=>82, :y_end=>53},
|
|
109
|
+
{ :word => 'speak', :confidence=>96, :x_start=>90, :y_start=>35, :x_end=>140, :y_end=>53},
|
|
110
|
+
{ :word => 'the', :confidence=>96, :x_start=>146, :y_start=>35, :x_end=>174, :y_end=>49},
|
|
111
|
+
{ :word => 'password,', :confidence=>96, :x_start=>182, :y_start=>35, :x_end=>267, :y_end=>53},
|
|
112
|
+
{ :word => 'and', :confidence=>96, :x_start=>51, :y_start=>57, :x_end=>81, :y_end=>71},
|
|
113
|
+
{ :word => 'the', :confidence=>96, :x_start=>89, :y_start=>57, :x_end=>117, :y_end=>71},
|
|
114
|
+
{ :word => 'doors', :confidence=>96, :x_start=>124, :y_start=>57, :x_end=>172, :y_end=>71},
|
|
115
|
+
{ :word => 'will', :confidence=>96, :x_start=>180, :y_start=>57, :x_end=>208, :y_end=>71},
|
|
116
|
+
{ :word => 'open.', :confidence=>96, :x_start=>216, :y_start=>61, :x_end=>263, :y_end=>75}
|
|
117
117
|
]
|
|
118
118
|
```
|
|
119
119
|
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
data/lib/rtesseract.rb
CHANGED
data/lib/rtesseract/base.rb
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'tmpdir'
|
|
2
4
|
require 'securerandom'
|
|
3
5
|
require 'pathname'
|
|
4
6
|
|
|
5
7
|
class RTesseract
|
|
6
8
|
module Base
|
|
7
|
-
def
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Pathname.new(Dir.tmpdir).join("#{@rand_file}#{ext}").to_s
|
|
9
|
+
def temp_file_path
|
|
10
|
+
Pathname.new(Dir.tmpdir).join("rtesseract_#{SecureRandom.uuid}").to_s
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
end
|
data/lib/rtesseract/box.rb
CHANGED
|
@@ -1,33 +1,50 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
class RTesseract
|
|
4
4
|
module Box
|
|
5
5
|
extend RTesseract::Base
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
class << self
|
|
8
|
+
def run(source, errors, options)
|
|
9
|
+
options.tessedit_create_hocr = 1
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
RTesseract::Command.new(source, temp_file_path, errors, options).run do |output_path|
|
|
12
|
+
parse(File.read("#{output_path}.hocr"))
|
|
13
|
+
end
|
|
14
|
+
end
|
|
11
15
|
|
|
12
|
-
parse(
|
|
13
|
-
|
|
16
|
+
def parse(content)
|
|
17
|
+
content.lines.map { |line| parse_line(line) }.compact
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def parse_line(line)
|
|
21
|
+
return unless line.match?(/oc(rx|r)_word/)
|
|
22
|
+
|
|
23
|
+
word = line.match(/(?<=>)(.*?)(?=<)/).to_s
|
|
24
|
+
|
|
25
|
+
return if word.strip == ''
|
|
14
26
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
27
|
+
word_info(word, parse_position(line), parse_confidence(line))
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def word_info(word, positions, confidence)
|
|
31
|
+
{
|
|
32
|
+
word: word,
|
|
33
|
+
confidence: confidence[-1].to_i,
|
|
34
|
+
x_start: positions[1].to_i,
|
|
35
|
+
y_start: positions[2].to_i,
|
|
36
|
+
x_end: positions[3].to_i,
|
|
37
|
+
y_end: positions[4].to_i
|
|
38
|
+
}
|
|
20
39
|
end
|
|
21
|
-
end
|
|
22
40
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
41
|
+
def parse_position(line)
|
|
42
|
+
line.match(/(?<=title)(.*?)(?=;)/).to_s.split(' ')
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def parse_confidence(line)
|
|
46
|
+
line.match(/(?<=;)(.*?)(?=')/).to_s.split(' ')
|
|
47
|
+
end
|
|
31
48
|
end
|
|
32
49
|
end
|
|
33
50
|
end
|
data/lib/rtesseract/check.rb
CHANGED
data/lib/rtesseract/command.rb
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
class RTesseract
|
|
2
4
|
class Command
|
|
3
5
|
FIXED = %i[command psm oem lang tessdata_dir user_words user_patterns config_file].freeze
|
|
4
6
|
|
|
5
7
|
attr_reader :options
|
|
6
8
|
|
|
7
|
-
def initialize(source,
|
|
9
|
+
def initialize(source, output_path, errors, options)
|
|
8
10
|
@source = source
|
|
9
|
-
@
|
|
11
|
+
@output_path = output_path
|
|
10
12
|
@options = options
|
|
11
13
|
@errors = errors
|
|
12
|
-
@full_command = [options.command, @source, @
|
|
14
|
+
@full_command = [options.command, @source, @output_path]
|
|
13
15
|
end
|
|
14
16
|
|
|
15
17
|
def full_command
|
|
16
18
|
add_option('--psm', options.psm)
|
|
17
19
|
add_option('--oem', options.oem)
|
|
18
20
|
add_option('-l', options.lang)
|
|
19
|
-
add_option('--
|
|
20
|
-
add_option('--
|
|
21
|
-
add_option('--
|
|
21
|
+
add_option('--tessdata-dir', options.tessdata_dir)
|
|
22
|
+
add_option('--user-words', options.user_words)
|
|
23
|
+
add_option('--user-patterns', options.user_patterns)
|
|
22
24
|
|
|
23
25
|
other_configs
|
|
24
26
|
|
|
@@ -46,7 +48,11 @@ class RTesseract
|
|
|
46
48
|
|
|
47
49
|
@errors.push(error)
|
|
48
50
|
|
|
49
|
-
|
|
51
|
+
if status.success?
|
|
52
|
+
return yield(@output_path) if block_given?
|
|
53
|
+
|
|
54
|
+
return output
|
|
55
|
+
end
|
|
50
56
|
|
|
51
57
|
raise RTesseract::Error, error
|
|
52
58
|
end
|
data/lib/rtesseract/pdf.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
class RTesseract
|
|
2
4
|
module Pdf
|
|
3
5
|
extend Base
|
|
@@ -5,9 +7,9 @@ class RTesseract
|
|
|
5
7
|
def self.run(source, errors, options)
|
|
6
8
|
options.tessedit_create_pdf = 1
|
|
7
9
|
|
|
8
|
-
RTesseract::Command.new(source,
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
RTesseract::Command.new(source, temp_file_path, errors, options).run do |output_path|
|
|
11
|
+
File.open("#{output_path}.pdf", 'r')
|
|
12
|
+
end
|
|
11
13
|
end
|
|
12
14
|
end
|
|
13
15
|
end
|
data/lib/rtesseract/text.rb
CHANGED
data/lib/rtesseract/tsv.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
class RTesseract
|
|
2
4
|
module Tsv
|
|
3
5
|
extend Base
|
|
@@ -5,9 +7,9 @@ class RTesseract
|
|
|
5
7
|
def self.run(source, errors, options)
|
|
6
8
|
options.tessedit_create_tsv = 1
|
|
7
9
|
|
|
8
|
-
RTesseract::Command.new(source,
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
RTesseract::Command.new(source, temp_file_path, errors, options).run do |output_path|
|
|
11
|
+
File.open("#{output_path}.tsv", 'r')
|
|
12
|
+
end
|
|
11
13
|
end
|
|
12
14
|
end
|
|
13
15
|
end
|
data/lib/rtesseract/version.rb
CHANGED
data/rtesseract.gemspec
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
lib = File.expand_path('lib', __dir__)
|
|
2
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
5
|
require 'rtesseract/version'
|
|
@@ -8,9 +10,9 @@ Gem::Specification.new do |spec|
|
|
|
8
10
|
spec.authors = ['Danilo Jeremias da Silva']
|
|
9
11
|
spec.email = ['dannnylo@gmail.com']
|
|
10
12
|
|
|
11
|
-
spec.summary = 'Ruby library for working with the Tesseract OCR.'
|
|
12
|
-
spec.description = 'Ruby library for working with the Tesseract OCR.'
|
|
13
|
-
spec.homepage = 'http://github.com/dannnylo/rtesseract'
|
|
13
|
+
spec.summary = 'Ruby library for working with the Tesseract OCR.'
|
|
14
|
+
spec.description = 'Ruby library for working with the Tesseract OCR.'
|
|
15
|
+
spec.homepage = 'http://github.com/dannnylo/rtesseract'
|
|
14
16
|
spec.license = 'MIT'
|
|
15
17
|
|
|
16
18
|
# Specify which files should be added to the gem when it is released.
|
|
@@ -22,11 +24,8 @@ Gem::Specification.new do |spec|
|
|
|
22
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
23
25
|
spec.require_paths = ['lib']
|
|
24
26
|
|
|
25
|
-
spec.add_development_dependency 'bundler', '~>
|
|
27
|
+
spec.add_development_dependency 'bundler', '~> 2'
|
|
26
28
|
spec.add_development_dependency 'coveralls'
|
|
27
|
-
spec.add_development_dependency 'rake'
|
|
28
|
-
spec.add_development_dependency 'rspec'
|
|
29
|
-
spec.add_development_dependency 'simplecov'
|
|
30
|
-
|
|
31
|
-
spec.add_dependency 'nokogiri'
|
|
29
|
+
spec.add_development_dependency 'rake'
|
|
30
|
+
spec.add_development_dependency 'rspec'
|
|
32
31
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rtesseract
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Danilo Jeremias da Silva
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-08-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '2'
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
26
|
+
version: '2'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: coveralls
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -40,34 +40,6 @@ dependencies:
|
|
|
40
40
|
version: '0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: rake
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - "~>"
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: '10.0'
|
|
48
|
-
type: :development
|
|
49
|
-
prerelease: false
|
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
-
requirements:
|
|
52
|
-
- - "~>"
|
|
53
|
-
- !ruby/object:Gem::Version
|
|
54
|
-
version: '10.0'
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: rspec
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - "~>"
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '3.0'
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - "~>"
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '3.0'
|
|
69
|
-
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: simplecov
|
|
71
43
|
requirement: !ruby/object:Gem::Requirement
|
|
72
44
|
requirements:
|
|
73
45
|
- - ">="
|
|
@@ -81,13 +53,13 @@ dependencies:
|
|
|
81
53
|
- !ruby/object:Gem::Version
|
|
82
54
|
version: '0'
|
|
83
55
|
- !ruby/object:Gem::Dependency
|
|
84
|
-
name:
|
|
56
|
+
name: rspec
|
|
85
57
|
requirement: !ruby/object:Gem::Requirement
|
|
86
58
|
requirements:
|
|
87
59
|
- - ">="
|
|
88
60
|
- !ruby/object:Gem::Version
|
|
89
61
|
version: '0'
|
|
90
|
-
type: :
|
|
62
|
+
type: :development
|
|
91
63
|
prerelease: false
|
|
92
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
65
|
requirements:
|
|
@@ -102,10 +74,11 @@ extensions: []
|
|
|
102
74
|
extra_rdoc_files: []
|
|
103
75
|
files:
|
|
104
76
|
- ".document"
|
|
77
|
+
- ".github/workflows/ci.yml"
|
|
105
78
|
- ".gitignore"
|
|
79
|
+
- ".hound.yml"
|
|
106
80
|
- ".rspec"
|
|
107
81
|
- ".rubocop.yml"
|
|
108
|
-
- ".travis.yml"
|
|
109
82
|
- CHANGELOG.md
|
|
110
83
|
- CODE_OF_CONDUCT.md
|
|
111
84
|
- Gemfile
|
|
@@ -145,8 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
145
118
|
- !ruby/object:Gem::Version
|
|
146
119
|
version: '0'
|
|
147
120
|
requirements: []
|
|
148
|
-
|
|
149
|
-
rubygems_version: 2.7.8
|
|
121
|
+
rubygems_version: 3.1.2
|
|
150
122
|
signing_key:
|
|
151
123
|
specification_version: 4
|
|
152
124
|
summary: Ruby library for working with the Tesseract OCR.
|
data/.travis.yml
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
|
|
3
|
-
sudo: false
|
|
4
|
-
dist: bionic
|
|
5
|
-
language: ruby
|
|
6
|
-
cache: bundler
|
|
7
|
-
|
|
8
|
-
before_install:
|
|
9
|
-
- sudo add-apt-repository ppa:alex-p/tesseract-ocr -y
|
|
10
|
-
- sudo apt-get update -q
|
|
11
|
-
- sudo apt-get install tesseract-ocr tesseract-ocr-eng ghostscript -y
|
|
12
|
-
- gem install bundler -v 1.17.1
|
|
13
|
-
|
|
14
|
-
rvm:
|
|
15
|
-
- 2.4.5
|
|
16
|
-
- 2.5.3
|
|
17
|
-
- 2.6.0
|