ruby_pager 0.1.2 → 0.1.3
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/Gemfile.lock +4 -4
- data/bin/baseline_noise +9 -9
- data/bin/line_edit +10 -10
- data/bin/page_create +10 -10
- data/bin/region_edit +10 -10
- data/lib/ruby_pager/version.rb +1 -1
- data/ruby_pager.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 79b1837d6e7c99b3f8b189c41f04b23b94742b42
|
|
4
|
+
data.tar.gz: fa38bcd7f680e02525219b1b75a84fad907e1fbd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1333b9f533494d18dd6bd38279f4457a9ed99dd1a31c1b06c8f0cfb59fd8bd7bec808a663f0af690ddb018a3751f68aa9836fc1ed8bb2b651d14e015ba5c5964
|
|
7
|
+
data.tar.gz: 37358324420b7e9fd7c5d4d0c772b6ddff69161cd732df92973193f727b3a886288cf366e736ce2efeb8abe48b1d2b3895255a440b9193549807aa3a57631dfa
|
data/Gemfile.lock
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
ruby_pager (0.1.
|
|
4
|
+
ruby_pager (0.1.2)
|
|
5
5
|
awesome_print
|
|
6
6
|
extendmatrix
|
|
7
7
|
gosu
|
|
8
8
|
nokogiri
|
|
9
9
|
nori
|
|
10
|
+
optimist
|
|
10
11
|
pry
|
|
11
12
|
rgeo
|
|
12
13
|
rmagick
|
|
13
|
-
trollop
|
|
14
14
|
|
|
15
15
|
GEM
|
|
16
16
|
remote: https://rubygems.org/
|
|
@@ -50,7 +50,7 @@ GEM
|
|
|
50
50
|
extendmatrix (0.4)
|
|
51
51
|
ffi (1.9.25)
|
|
52
52
|
gherkin (5.1.0)
|
|
53
|
-
gosu (0.
|
|
53
|
+
gosu (0.14.0)
|
|
54
54
|
json (2.1.0)
|
|
55
55
|
method_source (0.9.0)
|
|
56
56
|
mini_portile2 (2.3.0)
|
|
@@ -59,6 +59,7 @@ GEM
|
|
|
59
59
|
nokogiri (1.8.4)
|
|
60
60
|
mini_portile2 (~> 2.3.0)
|
|
61
61
|
nori (2.6.0)
|
|
62
|
+
optimist (3.0.0)
|
|
62
63
|
pry (0.11.3)
|
|
63
64
|
coderay (~> 1.1.0)
|
|
64
65
|
method_source (~> 0.9.0)
|
|
@@ -84,7 +85,6 @@ GEM
|
|
|
84
85
|
simplecov-html (~> 0.10.0)
|
|
85
86
|
simplecov-html (0.10.2)
|
|
86
87
|
thor (0.20.0)
|
|
87
|
-
trollop (2.1.3)
|
|
88
88
|
|
|
89
89
|
PLATFORMS
|
|
90
90
|
ruby
|
data/bin/baseline_noise
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
require "bundler/setup"
|
|
4
4
|
require "ruby_pager"
|
|
5
5
|
#require_relative "../lib/ruby_pager.rb"
|
|
6
|
-
require "
|
|
6
|
+
require "optimist"
|
|
7
7
|
require "ap"
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
opts =
|
|
10
|
+
opts = Optimist::options do
|
|
11
11
|
version "baseline_noise 0.0.1 (c) 2018 Vicente Bosch Campos"
|
|
12
12
|
banner <<-EOS
|
|
13
13
|
baseline_noise is a command tool that adds gaussian noise to each baseline point of each baseline present in the page document
|
|
@@ -22,13 +22,13 @@ Usage:
|
|
|
22
22
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
Optimist::die :mode, "Operation mode was not selected" unless opts[:mode]
|
|
26
|
+
Optimist::die :mode, "Operation mode selected must be either ver (vertical), hor (horizontal) or all (both vertical and horizontal)" unless opts[:mode]=="ver" or opts[:mode]=="hor" or opts[:mode]=="all"
|
|
27
|
+
Optimist::die :input_file, "Input page file name was not indicated" unless opts[:input_file]
|
|
28
|
+
Optimist::die :input_file, "Indicated input page file does not exist which is required" unless File.exist?(opts[:input_file])
|
|
29
|
+
Optimist::die :output_file, "Output page file name was not indicated" unless opts[:output_file]
|
|
30
|
+
Optimist::die :output_file, "Indicated output page file exists which will cause the command to overwrite it" if File.exist?(opts[:output_file])
|
|
31
|
+
Optimist::die :std_dev, "Standard deviation must be zero or a positive floating number" if opts[:std_dev]<0.0
|
|
32
32
|
|
|
33
33
|
input_page = RubyPager::Page.load_from_xml(opts[:input_file])
|
|
34
34
|
|
data/bin/line_edit
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
require "bundler/setup"
|
|
4
4
|
require "ruby_pager"
|
|
5
|
-
require "
|
|
5
|
+
require "optimist"
|
|
6
6
|
require "ap"
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
opts =
|
|
9
|
+
opts = Optimist::options do
|
|
10
10
|
version "line_edit 0.0.1 (c) 2018 Vicente Bosch Campos"
|
|
11
11
|
banner <<-EOS
|
|
12
12
|
line_edit is a command tool that allows the creation,edition or deletion of text lines in a Page XML file
|
|
@@ -24,14 +24,14 @@ Usage:
|
|
|
24
24
|
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
Optimist::die :mode, "Operation mode was not selected" unless opts[:mode]
|
|
28
|
+
Optimist::die :mode, "Operation mode selected must be either mk (make), rm (remove) or ed (edit)" unless opts[:mode]=="mk" or opts[:mode]=="rm" or opts[:mode]=="ed"
|
|
29
|
+
Optimist::die :input_file, "Input page file name was not indicated" unless opts[:input_file]
|
|
30
|
+
Optimist::die :input_file, "Indicated input page file does not exist which is required" unless File.exist?(opts[:input_file])
|
|
31
|
+
Optimist::die :output_file, "Output page file name was not indicated" unless opts[:output_file]
|
|
32
|
+
Optimist::die :output_file, "Indicated output page file exists which will cause the command to overwrite it" if File.exist?(opts[:output_file])
|
|
33
|
+
Optimist::die :label_id, "Label id of region to be added/edited/deleted was not specified" unless opts[:label_id]
|
|
34
|
+
Optimist::die :coords, "Region was selected to be addedd but no coordinates for the contour were provided" if opts[:mode]=="mk" and not opts[:coords]
|
|
35
35
|
|
|
36
36
|
input_page = RubyPager::Page.load_from_xml(opts[:input_file])
|
|
37
37
|
|
data/bin/page_create
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
require "bundler/setup"
|
|
4
4
|
require "ruby_pager"
|
|
5
|
-
require "
|
|
5
|
+
require "optimist"
|
|
6
6
|
require "ap"
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
opts =
|
|
9
|
+
opts = Optimist::options do
|
|
10
10
|
version "page_create 0.0.1 (c) 2018 Vicente Bosch Campos"
|
|
11
11
|
banner <<-EOS
|
|
12
12
|
page_create is a command tool that creates Page format xmls as per defined input
|
|
@@ -24,14 +24,14 @@ Usage:
|
|
|
24
24
|
opt :region_name, "Label to be used for the full text region created", :type=>:string, :default => "region_1"
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
Optimist::die :mode, "Operation mode was not selected" unless opts[:mode]
|
|
28
|
+
Optimist::die :mode, "Operation mode selected must be either data or image" unless opts[:mode]=="data" or opts[:mode]=="image"
|
|
29
|
+
Optimist::die :image_file, "Image file name was not indicated" unless opts[:image_file]
|
|
30
|
+
Optimist::die :image_file, "Indicated image file does not exist which is required in image mode" unless File.exist?(opts[:image_file]) or opts[:mode]=="data"
|
|
31
|
+
Optimist::die :creator, "Creator name was not indicated" unless opts[:creator]
|
|
32
|
+
Optimist::die :width, "Width parameter can not be a negative value" unless opts[:width] >= 0
|
|
33
|
+
Optimist::die :height, "Height parameter can not be a negative value" unless opts[:height] >= 0
|
|
34
|
+
Optimist::die :region_name, "Region name can't be empty if the creation of the full text region was selected" if opts[:full] and opts[:region_name].empty?
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
if opts[:mode] == "image"
|
data/bin/region_edit
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
require "bundler/setup"
|
|
4
4
|
require "ruby_pager"
|
|
5
|
-
require "
|
|
5
|
+
require "optimist"
|
|
6
6
|
require "ap"
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
opts =
|
|
9
|
+
opts = Optimist::options do
|
|
10
10
|
version "region_edit 0.0.1 (c) 2018 Vicente Bosch Campos"
|
|
11
11
|
banner <<-EOS
|
|
12
12
|
region_edit is a command tool that allows the creation,edition or deletion of text regions in a Page XML file
|
|
@@ -23,14 +23,14 @@ Usage:
|
|
|
23
23
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
Optimist::die :mode, "Operation mode was not selected" unless opts[:mode]
|
|
27
|
+
Optimist::die :mode, "Operation mode selected must be either mk (make), rm (remove) or ed (edit)" unless opts[:mode]=="mk" or opts[:mode]=="rm" or opts[:mode]=="ed"
|
|
28
|
+
Optimist::die :input_file, "Input page file name was not indicated" unless opts[:input_file]
|
|
29
|
+
Optimist::die :input_file, "Indicated input page file does not exist which is required" unless File.exist?(opts[:input_file])
|
|
30
|
+
Optimist::die :output_file, "Output page file name was not indicated" unless opts[:output_file]
|
|
31
|
+
Optimist::die :output_file, "Indicated output page file exists which will cause the command to overwrite it" if File.exist?(opts[:output_file])
|
|
32
|
+
Optimist::die :label_id, "Label id of region to be added/edited/deleted was not specified" unless opts[:label_id]
|
|
33
|
+
Optimist::die :coords, "Region was selected to be addedd but no coordinates for the contour were provided" if opts[:mode]=="mk" and not opts[:coords]
|
|
34
34
|
|
|
35
35
|
input_page = RubyPager::Page.load_from_xml(opts[:input_file])
|
|
36
36
|
|
data/lib/ruby_pager/version.rb
CHANGED
data/ruby_pager.gemspec
CHANGED
|
@@ -37,7 +37,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
37
37
|
spec.add_dependency "rgeo"
|
|
38
38
|
spec.add_dependency "gosu"
|
|
39
39
|
spec.add_dependency "rmagick"
|
|
40
|
-
spec.add_dependency "
|
|
40
|
+
spec.add_dependency "optimist"
|
|
41
41
|
spec.add_dependency "nori"
|
|
42
42
|
spec.add_dependency "awesome_print"
|
|
43
43
|
spec.add_dependency "nokogiri"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby_pager
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vicente Bosch
|
|
@@ -137,7 +137,7 @@ dependencies:
|
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
138
|
version: '0'
|
|
139
139
|
- !ruby/object:Gem::Dependency
|
|
140
|
-
name:
|
|
140
|
+
name: optimist
|
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
|
142
142
|
requirements:
|
|
143
143
|
- - ">="
|