wax_tasks 1.0.0 → 1.0.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/wax_tasks/collection/images.rb +5 -3
- data/lib/wax_tasks/item.rb +5 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7aaaa017dde02724ff7e1c5099365ba0711a4da6be73f3ba2a648b737c7d7cd1
|
4
|
+
data.tar.gz: 11c56f4a34b598d17912eba5c94b9f2c77a2b6ee7628dcdf591743e0213c324f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db11be3906fb85b4d8d454818441ad29893eed2de6c27c54231dcf31013449ff4126e9aea77797ed727497463e6211f92655c3410dd192347116c3e08970e2ff
|
7
|
+
data.tar.gz: a851be1a81ecd5edaaec560d701b25975edca9943c6a9b7d7b0e2ab916cde986c2e3904594af2e77da7ffcd7973c8bac0ee415217eb73691e0466808dd247501
|
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
require 'mini_magick'
|
4
4
|
require 'progress_bar'
|
5
|
-
require 'progress_bar/core_ext/enumerable_with_progress'
|
6
5
|
require 'wax_iiif'
|
7
6
|
|
8
7
|
#
|
@@ -54,7 +53,9 @@ module WaxTasks
|
|
54
53
|
#
|
55
54
|
def write_simple_derivatives(dir)
|
56
55
|
puts Rainbow("Generating simple image derivatives for collection '#{@name}'\nThis might take awhile.").cyan
|
57
|
-
|
56
|
+
|
57
|
+
bar = ProgressBar.new(items_from_imagedata.length)
|
58
|
+
items_from_imagedata.map do |item|
|
58
59
|
item.simple_derivatives.each do |d|
|
59
60
|
path = "#{dir}/#{d.path}"
|
60
61
|
FileUtils.mkdir_p File.dirname(path)
|
@@ -63,6 +64,8 @@ module WaxTasks
|
|
63
64
|
d.img.write path
|
64
65
|
item.record.set d.label, path if item.record?
|
65
66
|
end
|
67
|
+
bar.increment!
|
68
|
+
bar.write
|
66
69
|
item
|
67
70
|
end.flat_map(&:record)
|
68
71
|
end
|
@@ -73,7 +76,6 @@ module WaxTasks
|
|
73
76
|
build_opts = {
|
74
77
|
base_url: "{{ '/' | absolute_url }}#{dir}",
|
75
78
|
output_dir: dir,
|
76
|
-
# variants: @image_variants,
|
77
79
|
collection_label: @name
|
78
80
|
}
|
79
81
|
WaxIiif::Builder.new(build_opts)
|
data/lib/wax_tasks/item.rb
CHANGED
@@ -10,11 +10,11 @@ module WaxTasks
|
|
10
10
|
#
|
11
11
|
#
|
12
12
|
def initialize(path, variants)
|
13
|
-
@path
|
14
|
-
@variants
|
15
|
-
@type
|
16
|
-
@pid
|
17
|
-
@assets
|
13
|
+
@path = path
|
14
|
+
@variants = variants
|
15
|
+
@type = type
|
16
|
+
@pid = File.basename @path, '.*'
|
17
|
+
@assets = assets
|
18
18
|
end
|
19
19
|
|
20
20
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wax_tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marii Nyrop
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: progress_bar
|
@@ -72,7 +72,7 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.1.
|
75
|
+
version: 0.1.2
|
76
76
|
- - "<"
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '0.2'
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
requirements:
|
83
83
|
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: 0.1.
|
85
|
+
version: 0.1.2
|
86
86
|
- - "<"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0.2'
|