mork 0.8.0 → 0.8.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/lib/mork/grid.rb +1 -1
- data/lib/mork/grid_const.rb +19 -23
- data/lib/mork/version.rb +1 -1
- data/spec/samples/boxy.yml +1 -3
- data/spec/samples/grid.yml +3 -0
- data/spec/samples/grid160.yml +3 -6
- data/spec/samples/layout.yml +10 -10
- 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: 0b09396164e58d22ccd0551b167333469bc754d0
|
4
|
+
data.tar.gz: 6bda803a414aceb17b8011fb1decadc2f5fd9848
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5cd7f9419791b146fd90b14b2ea518be9fd8c09ac11214b699d8308dbe7ed5e0dadc1fba7f68414a730422b959538ef77a8b15ad914088afd83037cde1fddf8
|
7
|
+
data.tar.gz: 54a38a8b8c6681731045d7bef9f98afb08af93715a896c98eba40c75581843d4d5ed39985fcf6ae005f202c0e671dd5c48c8358e812f115340ccff6b7f685eaa
|
data/lib/mork/grid.rb
CHANGED
@@ -25,7 +25,7 @@ module Mork
|
|
25
25
|
|
26
26
|
# Puts out the Grid parameters in YAML format; the entire hash is displayed
|
27
27
|
# if no arguments are given; you can specify what to show by passing one of:
|
28
|
-
# :page_size, :reg_marks, :header, :items, :barcode
|
28
|
+
# :page_size, :reg_marks, :header, :items, :barcode
|
29
29
|
def show(subset=nil)
|
30
30
|
out = subset ? @params[subset] : @params
|
31
31
|
puts out.to_yaml
|
data/lib/mork/grid_const.rb
CHANGED
@@ -11,8 +11,7 @@ module Mork
|
|
11
11
|
# size, location, search parameters of registration marks
|
12
12
|
reg_marks: {
|
13
13
|
margin: 10,
|
14
|
-
radius:
|
15
|
-
search: 10, # remove this?
|
14
|
+
radius: 3,
|
16
15
|
offset: 2,
|
17
16
|
crop: 20, # size of square where the regmark should be located
|
18
17
|
dilate: 0, # set to >0 to apply a dilate IM operation
|
@@ -21,29 +20,33 @@ module Mork
|
|
21
20
|
header: {
|
22
21
|
name: {
|
23
22
|
top: 5,
|
24
|
-
left:
|
25
|
-
width:
|
26
|
-
|
23
|
+
left: 15,
|
24
|
+
width: 160,
|
25
|
+
height: 7,
|
26
|
+
size: 14
|
27
27
|
},
|
28
28
|
title: {
|
29
29
|
top: 15,
|
30
|
-
left:
|
31
|
-
width:
|
30
|
+
left: 15,
|
31
|
+
width: 160,
|
32
|
+
height: 12,
|
32
33
|
size: 12
|
33
34
|
},
|
34
35
|
code: {
|
35
|
-
top:
|
36
|
-
left:
|
37
|
-
width:
|
38
|
-
|
36
|
+
top: 30,
|
37
|
+
left: 155,
|
38
|
+
width: 35,
|
39
|
+
height: 10,
|
40
|
+
size: 14,
|
41
|
+
align: :right
|
39
42
|
},
|
40
43
|
signature: {
|
41
44
|
top: 30,
|
42
|
-
left:
|
45
|
+
left: 15,
|
43
46
|
width: 120,
|
44
47
|
height: 15,
|
45
48
|
size: 7,
|
46
|
-
box: true
|
49
|
+
box: true
|
47
50
|
}
|
48
51
|
}, # header end
|
49
52
|
items: {
|
@@ -52,8 +55,8 @@ module Mork
|
|
52
55
|
rows: 30,
|
53
56
|
# from the top-left registration mark
|
54
57
|
# to the center of the first choice cell
|
55
|
-
left:
|
56
|
-
top:
|
58
|
+
left: 10.5,
|
59
|
+
top: 55.5,
|
57
60
|
# between choices
|
58
61
|
x_spacing: 7,
|
59
62
|
# between rows
|
@@ -76,13 +79,6 @@ module Mork
|
|
76
79
|
width: 3,
|
77
80
|
height: 3,
|
78
81
|
spacing: 4
|
79
|
-
}
|
80
|
-
control: {
|
81
|
-
top: 40,
|
82
|
-
left: 123,
|
83
|
-
width: 50,
|
84
|
-
size: 9,
|
85
|
-
margin: 2.5
|
86
|
-
} # control end
|
82
|
+
} # barcode end
|
87
83
|
}
|
88
84
|
end
|
data/lib/mork/version.rb
CHANGED
data/spec/samples/boxy.yml
CHANGED
@@ -6,10 +6,8 @@ reg_marks:
|
|
6
6
|
radius: 3 # registration mark radius
|
7
7
|
offset: 2 # distance between the search area and each page border (*)
|
8
8
|
crop: 20
|
9
|
-
offset: 2
|
10
9
|
blur: 2
|
11
10
|
dilate: 5
|
12
|
-
|
13
11
|
header:
|
14
12
|
name: # ‘name’ is just a label; you can add arbitrary header elements
|
15
13
|
top: 5 # margin relative to registration frame top side
|
@@ -17,7 +15,7 @@ header:
|
|
17
15
|
width: 160 # text will be fitted to this width
|
18
16
|
height: 7 # text will be fitted to this height
|
19
17
|
size: 14 # font size
|
20
|
-
box: true
|
18
|
+
# box: true
|
21
19
|
title:
|
22
20
|
top: 15
|
23
21
|
left: 15
|
data/spec/samples/grid.yml
CHANGED
@@ -13,16 +13,19 @@ header:
|
|
13
13
|
top: 5
|
14
14
|
left: 7.5
|
15
15
|
width: 170
|
16
|
+
height: 7
|
16
17
|
size: 14
|
17
18
|
title:
|
18
19
|
top: 15
|
19
20
|
left: 7.5
|
20
21
|
width: 180
|
22
|
+
height: 12
|
21
23
|
size: 12
|
22
24
|
code:
|
23
25
|
top: 5
|
24
26
|
left: 165
|
25
27
|
width: 20
|
28
|
+
height: 10
|
26
29
|
size: 14
|
27
30
|
signature:
|
28
31
|
top: 30
|
data/spec/samples/grid160.yml
CHANGED
@@ -11,16 +11,19 @@ header:
|
|
11
11
|
top: 5
|
12
12
|
left: 7.5
|
13
13
|
width: 170
|
14
|
+
height: 7
|
14
15
|
size: 14
|
15
16
|
title:
|
16
17
|
top: 12
|
17
18
|
left: 7.5
|
18
19
|
width: 85
|
20
|
+
height: 12
|
19
21
|
size: 12
|
20
22
|
code:
|
21
23
|
top: 5
|
22
24
|
left: 165
|
23
25
|
width: 20
|
26
|
+
height: 10
|
24
27
|
size: 14
|
25
28
|
signature:
|
26
29
|
top: 12
|
@@ -49,9 +52,3 @@ barcode:
|
|
49
52
|
width: 3.0
|
50
53
|
height: 3
|
51
54
|
spacing: 4
|
52
|
-
control:
|
53
|
-
top: 40
|
54
|
-
left: 123
|
55
|
-
width: 50
|
56
|
-
size: 9
|
57
|
-
margin: 2.5
|
data/spec/samples/layout.yml
CHANGED
@@ -1,31 +1,31 @@
|
|
1
|
-
page_size:
|
2
|
-
width: 210
|
3
|
-
height: 297
|
1
|
+
page_size: # all measurements in mm
|
2
|
+
width: 210 # width of the paper sheet
|
3
|
+
height: 297 # height of the paper sheet
|
4
4
|
reg_marks:
|
5
|
-
margin: 10
|
6
|
-
radius: 2.5
|
7
|
-
offset: 2
|
5
|
+
margin: 10 # distance from each page border to registration mark center
|
6
|
+
radius: 2.5 # registration mark radius
|
7
|
+
offset: 2 # distance between the search area and each page border (*)
|
8
8
|
crop: 20
|
9
|
-
offset: 2
|
10
9
|
blur: 2
|
11
10
|
dilate: 5
|
12
|
-
|
13
|
-
|
14
11
|
header:
|
15
|
-
name:
|
12
|
+
name: # ‘name’ is just a label; you can add arbitrary header elements
|
16
13
|
top: 5 # margin relative to registration frame top side
|
17
14
|
left: 15 # margin relative to registration frame left side
|
18
15
|
width: 170 # text will be fitted to this width
|
16
|
+
height: 7 # text will be fitted to this height
|
19
17
|
size: 14 # font size
|
20
18
|
title:
|
21
19
|
top: 15
|
22
20
|
left: 15
|
23
21
|
width: 180
|
22
|
+
height: 12
|
24
23
|
size: 12
|
25
24
|
code:
|
26
25
|
top: 5
|
27
26
|
left: 165
|
28
27
|
width: 20
|
28
|
+
height: 10
|
29
29
|
size: 14
|
30
30
|
signature:
|
31
31
|
top: 30
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Giuseppe Bertini
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: narray
|