ehbrs-tools 0.31.1 → 0.33.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +6 -5
- data/Gemfile.lock +124 -133
- data/lib/ehbrs/tools/runner/music/spread.rb +2 -2
- data/lib/ehbrs/tools/runner/vg/ips.rb +9 -2
- data/lib/ehbrs/tools/runner/videos/opensubtitles.rb +69 -0
- data/lib/ehbrs/tools/version.rb +1 -1
- data/spec/lib/ehbrs/tools/runner/videos/probe_spec_files/fixed.target.yaml +3 -3
- data/spec/lib/ehbrs/tools/runner/videos/unsupported_spec_files/dts_audio.probe.yaml +3 -2
- metadata +38 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0728c0fbad8fab193328dd043e9cf25bfef615b8b2e52d3074c863891b927768'
|
4
|
+
data.tar.gz: 47ae7d7c0043ae8d8acabd50162164f60d6e04382dfb0aabefc18348749ddc33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab4f85fcf64f335ad87bbcdcbafaa67ffd5fa28b9f2704cd2a0e1b6cdae0f8fa3d0f75baca2bb5eb1edef2be3f57dd48e9cbfc19a75c40b5e4e5301b226f614f
|
7
|
+
data.tar.gz: d0865c776d105d97e91c24a8a5de73d13bfe4cde450580944644cacb8ec27e8b63ec87031e67578612de2881f91de2a6aa20992f0ad839be271d9aa6044c569e
|
data/Gemfile
CHANGED
@@ -4,12 +4,13 @@ source 'https://rubygems.org'
|
|
4
4
|
|
5
5
|
gemspec
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
next unless ::File.directory?(dir)
|
7
|
+
::Dir["#{::File.join(__dir__, 'sub')}/*"].each do |dir|
|
8
|
+
next unless ::File.exist?(::File.join(dir, "#{::File.basename(dir)}.gemspec"))
|
10
9
|
|
11
|
-
|
12
|
-
gem basename, path: "#{gems_subdir}/#{basename}"
|
10
|
+
gem ::File.basename(dir), path: dir, require: false
|
13
11
|
end
|
14
12
|
|
15
13
|
gem 'httpclient', git: 'https://github.com/livelink/httpclient.git'
|
14
|
+
|
15
|
+
local_gemfile = ::File.join(::File.dirname(__FILE__), 'Gemfile.local')
|
16
|
+
eval_gemfile local_gemfile if ::File.exist?(local_gemfile)
|
data/Gemfile.lock
CHANGED
@@ -7,81 +7,53 @@ GIT
|
|
7
7
|
PATH
|
8
8
|
remote: .
|
9
9
|
specs:
|
10
|
-
ehbrs-tools (0.
|
11
|
-
avm-tools (~> 0.
|
12
|
-
eac_cli (~> 0.
|
13
|
-
eac_ruby_utils (~> 0.
|
14
|
-
ehbrs_ruby_utils (~> 0.
|
10
|
+
ehbrs-tools (0.33.0)
|
11
|
+
avm-tools (~> 0.145, >= 0.145.1)
|
12
|
+
eac_cli (~> 0.30, >= 0.30.1)
|
13
|
+
eac_ruby_utils (~> 0.112)
|
14
|
+
ehbrs_ruby_utils (~> 0.19)
|
15
15
|
filesize (~> 0.2)
|
16
16
|
inifile (~> 3.0)
|
17
17
|
os (~> 1.1, >= 1.1.4)
|
18
18
|
telegram-bot-ruby (~> 0.19, >= 0.19.2)
|
19
19
|
|
20
|
-
PATH
|
21
|
-
remote: sub/aranha-parsers
|
22
|
-
specs:
|
23
|
-
aranha-parsers (0.14.2)
|
24
|
-
activesupport (~> 6.1.6, >= 6.1.6.1)
|
25
|
-
addressable (~> 2.8, >= 2.8.1)
|
26
|
-
curb (~> 0.9, >= 0.9.11)
|
27
|
-
eac_ruby_utils (~> 0.102, >= 0.102.1)
|
28
|
-
faraday-gzip (~> 0.1)
|
29
|
-
faraday_middleware (~> 1.2)
|
30
|
-
nokogiri (~> 1.13, >= 1.13.8)
|
31
|
-
ofx-parser (~> 1.1)
|
32
|
-
|
33
20
|
PATH
|
34
21
|
remote: sub/aranha-selenium
|
35
22
|
specs:
|
36
|
-
aranha-selenium (0.
|
37
|
-
eac_ruby_utils (~> 0.
|
23
|
+
aranha-selenium (0.5.0)
|
24
|
+
eac_ruby_utils (~> 0.106, >= 0.106.1)
|
38
25
|
selenium-webdriver (~> 3.142, >= 3.142.7)
|
39
26
|
|
40
27
|
PATH
|
41
28
|
remote: sub/eac_cli
|
42
29
|
specs:
|
43
|
-
eac_cli (0.
|
44
|
-
colorize (~> 0.8.1)
|
45
|
-
eac_config (~> 0.
|
46
|
-
eac_ruby_utils (~> 0.
|
47
|
-
|
48
|
-
PATH
|
49
|
-
remote: sub/eac_config
|
50
|
-
specs:
|
51
|
-
eac_config (0.11.1)
|
52
|
-
addressable (~> 2.8)
|
53
|
-
eac_ruby_utils (~> 0.102)
|
30
|
+
eac_cli (0.30.1)
|
31
|
+
colorize (~> 0.8, >= 0.8.1)
|
32
|
+
eac_config (~> 0.12)
|
33
|
+
eac_ruby_utils (~> 0.112)
|
54
34
|
|
55
35
|
PATH
|
56
36
|
remote: sub/eac_docker
|
57
37
|
specs:
|
58
|
-
eac_docker (0.
|
59
|
-
eac_ruby_utils (~> 0.
|
60
|
-
eac_templates (~> 0.3, >= 0.3.
|
61
|
-
|
62
|
-
PATH
|
63
|
-
remote: sub/eac_fs
|
64
|
-
specs:
|
65
|
-
eac_fs (0.12.3)
|
66
|
-
content-type
|
67
|
-
eac_ruby_utils (~> 0.70)
|
68
|
-
ruby-filemagic
|
38
|
+
eac_docker (0.6.0)
|
39
|
+
eac_ruby_utils (~> 0.112)
|
40
|
+
eac_templates (~> 0.3, >= 0.3.2)
|
69
41
|
|
70
42
|
PATH
|
71
43
|
remote: sub/eac_ruby_base0
|
72
44
|
specs:
|
73
|
-
eac_ruby_base0 (0.
|
74
|
-
avm-eac_ruby_base1 (~> 0.
|
75
|
-
eac_cli (~> 0.
|
76
|
-
eac_fs (~> 0.
|
77
|
-
eac_ruby_utils (~> 0.
|
45
|
+
eac_ruby_base0 (0.17.3)
|
46
|
+
avm-eac_ruby_base1 (~> 0.29)
|
47
|
+
eac_cli (~> 0.30, >= 0.30.1)
|
48
|
+
eac_fs (~> 0.16)
|
49
|
+
eac_ruby_utils (~> 0.112)
|
78
50
|
|
79
51
|
PATH
|
80
52
|
remote: sub/eac_ruby_utils
|
81
53
|
specs:
|
82
|
-
eac_ruby_utils (0.
|
54
|
+
eac_ruby_utils (0.112.0)
|
83
55
|
activesupport (>= 4, < 7)
|
84
|
-
addressable (~> 2.8)
|
56
|
+
addressable (~> 2.8, >= 2.8.1)
|
85
57
|
bundler
|
86
58
|
filesize (~> 0.2)
|
87
59
|
net-ssh (~> 4.2)
|
@@ -96,26 +68,20 @@ PATH
|
|
96
68
|
PATH
|
97
69
|
remote: sub/ehbrs_ruby_utils
|
98
70
|
specs:
|
99
|
-
ehbrs_ruby_utils (0.
|
100
|
-
aranha
|
101
|
-
|
102
|
-
|
103
|
-
|
71
|
+
ehbrs_ruby_utils (0.19.0)
|
72
|
+
aranha (~> 0.18)
|
73
|
+
aranha-parsers (~> 0.14, >= 0.14.4)
|
74
|
+
avm (~> 0.62)
|
75
|
+
eac_fs (~> 0.16)
|
76
|
+
eac_ruby_utils (~> 0.111)
|
104
77
|
eac_templates (~> 0.3, >= 0.3.2)
|
105
|
-
taglib-ruby (~> 1.1, >= 1.1.
|
78
|
+
taglib-ruby (~> 1.1, >= 1.1.3)
|
106
79
|
ultimate_lyrics (~> 0.1, >= 0.1.3)
|
107
80
|
|
108
|
-
PATH
|
109
|
-
remote: sub/ultimate_lyrics
|
110
|
-
specs:
|
111
|
-
ultimate_lyrics (0.1.3)
|
112
|
-
aranha-parsers (~> 0.10)
|
113
|
-
eac_ruby_utils (~> 0.102, >= 0.102.1)
|
114
|
-
|
115
81
|
GEM
|
116
82
|
remote: https://rubygems.org/
|
117
83
|
specs:
|
118
|
-
activesupport (6.1.
|
84
|
+
activesupport (6.1.7.2)
|
119
85
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
120
86
|
i18n (>= 1.6, < 2)
|
121
87
|
minitest (>= 5.1)
|
@@ -123,50 +89,69 @@ GEM
|
|
123
89
|
zeitwerk (~> 2.3)
|
124
90
|
addressable (2.8.1)
|
125
91
|
public_suffix (>= 2.0.2, < 6.0)
|
92
|
+
aranha (0.18.0)
|
93
|
+
aranha-parsers (~> 0.14, >= 0.14.3)
|
94
|
+
aranha-selenium (~> 0.5)
|
95
|
+
eac_ruby_utils (~> 0.106, >= 0.106.1)
|
96
|
+
httpclient (~> 2.8, >= 2.8.3)
|
97
|
+
aranha-parsers (0.14.4)
|
98
|
+
activesupport (>= 4.0.0)
|
99
|
+
addressable (~> 2.8, >= 2.8.1)
|
100
|
+
curb (~> 0.9, >= 0.9.11)
|
101
|
+
eac_ruby_utils (~> 0.106)
|
102
|
+
faraday-gzip (~> 0.1)
|
103
|
+
faraday_middleware (~> 1.2)
|
104
|
+
nokogiri (~> 1.13, >= 1.13.9)
|
105
|
+
ofx-parser (~> 1.1)
|
126
106
|
ast (2.4.2)
|
127
|
-
avm (0.
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
107
|
+
avm (0.62.0)
|
108
|
+
aranha-parsers (~> 0.14, >= 0.14.4)
|
109
|
+
eac_cli (~> 0.30)
|
110
|
+
eac_config (~> 0.12)
|
111
|
+
eac_docker (~> 0.5)
|
112
|
+
eac_fs (~> 0.16)
|
113
|
+
eac_git (~> 0.14)
|
114
|
+
eac_ruby_utils (~> 0.111)
|
115
|
+
eac_templates (~> 0.3, >= 0.3.2)
|
134
116
|
filesize (~> 0.2)
|
135
117
|
htmlbeautifier (~> 1.4, >= 1.4.2)
|
136
118
|
minitar (~> 0.9)
|
137
|
-
avm-eac_generic_base0 (0.
|
138
|
-
avm (~> 0.
|
139
|
-
eac_ruby_utils (~> 0.
|
140
|
-
avm-eac_ruby_base1 (0.
|
141
|
-
avm (~> 0.
|
142
|
-
avm-eac_generic_base0 (~> 0.
|
143
|
-
eac_ruby_utils (~> 0.
|
144
|
-
avm-eac_ubuntu_base0 (0.
|
145
|
-
avm (~> 0.
|
146
|
-
eac_ruby_utils (~> 0.
|
147
|
-
eac_templates (~> 0.3)
|
148
|
-
avm-files (0.
|
149
|
-
avm (~> 0.
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
avm
|
163
|
-
avm-
|
119
|
+
avm-eac_generic_base0 (0.10.0)
|
120
|
+
avm (~> 0.61)
|
121
|
+
eac_ruby_utils (~> 0.110, >= 0.110.1)
|
122
|
+
avm-eac_ruby_base1 (0.29.0)
|
123
|
+
avm (~> 0.61)
|
124
|
+
avm-eac_generic_base0 (~> 0.10)
|
125
|
+
eac_ruby_utils (~> 0.110, >= 0.110.1)
|
126
|
+
avm-eac_ubuntu_base0 (0.4.0)
|
127
|
+
avm (~> 0.57)
|
128
|
+
eac_ruby_utils (~> 0.109)
|
129
|
+
eac_templates (~> 0.3, >= 0.3.2)
|
130
|
+
avm-files (0.6.0)
|
131
|
+
avm (~> 0.52)
|
132
|
+
eac_cli (~> 0.28)
|
133
|
+
eac_fs (~> 0.12, >= 0.12.3)
|
134
|
+
eac_ruby_utils (~> 0.106)
|
135
|
+
eac_templates (~> 0.3, >= 0.3.2)
|
136
|
+
avm-git (0.12.0)
|
137
|
+
avm (~> 0.61)
|
138
|
+
avm-files (~> 0.6)
|
139
|
+
eac_git (~> 0.14)
|
140
|
+
eac_ruby_utils (~> 0.110, >= 0.110.1)
|
141
|
+
git (~> 1.13, >= 1.13.1)
|
142
|
+
avm-tools (0.145.1)
|
143
|
+
aranha-parsers (~> 0.14, >= 0.14.4)
|
144
|
+
avm (~> 0.62)
|
145
|
+
avm-eac_ruby_base1 (~> 0.29)
|
146
|
+
avm-eac_ubuntu_base0 (~> 0.4)
|
147
|
+
avm-files (~> 0.6)
|
148
|
+
avm-git (~> 0.12)
|
164
149
|
clipboard (~> 1.3, >= 1.3.6)
|
165
150
|
curb (~> 0.9, >= 0.9.11)
|
166
|
-
eac_git (~> 0.
|
167
|
-
eac_ruby_base0 (~> 0.
|
168
|
-
eac_templates (~> 0.3, >= 0.3.
|
169
|
-
git (~> 1.
|
151
|
+
eac_git (~> 0.14)
|
152
|
+
eac_ruby_base0 (~> 0.17, >= 0.17.2)
|
153
|
+
eac_templates (~> 0.3, >= 0.3.2)
|
154
|
+
git (~> 1.13, >= 1.13.1)
|
170
155
|
ruby-progressbar (~> 1.11)
|
171
156
|
axiom-types (0.1.1)
|
172
157
|
descendants_tracker (~> 0.0.4)
|
@@ -177,24 +162,31 @@ GEM
|
|
177
162
|
coercible (1.0.0)
|
178
163
|
descendants_tracker (~> 0.0.1)
|
179
164
|
colorize (0.8.1)
|
180
|
-
concurrent-ruby (1.
|
165
|
+
concurrent-ruby (1.2.0)
|
181
166
|
content-type (0.0.2)
|
182
167
|
parslet (~> 2.0)
|
183
168
|
curb (0.9.11)
|
184
169
|
descendants_tracker (0.0.4)
|
185
170
|
thread_safe (~> 0.3, >= 0.3.1)
|
186
171
|
diff-lcs (1.5.0)
|
187
|
-
dry-inflector (0.
|
188
|
-
|
189
|
-
|
190
|
-
|
172
|
+
dry-inflector (1.0.0)
|
173
|
+
eac_config (0.12.0)
|
174
|
+
addressable (~> 2.8, >= 2.8.1)
|
175
|
+
eac_ruby_utils (~> 0.107)
|
176
|
+
eac_fs (0.16.0)
|
177
|
+
content-type (~> 0.0, >= 0.0.2)
|
178
|
+
eac_ruby_utils (~> 0.107, >= 0.107.1)
|
179
|
+
ruby-filemagic (~> 0.7, >= 0.7.3)
|
180
|
+
eac_git (0.14.0)
|
181
|
+
eac_ruby_utils (~> 0.107)
|
182
|
+
parseconfig (~> 1.1, >= 1.1.2)
|
191
183
|
eac_ruby_gem_support (0.5.1)
|
192
184
|
eac_ruby_utils (~> 0.74)
|
193
185
|
rspec (~> 3.9)
|
194
186
|
rubocop (~> 0.80.1)
|
195
187
|
rubocop-rails (~> 2.4.2)
|
196
188
|
rubocop-rspec (~> 1.38.1)
|
197
|
-
faraday (1.10.
|
189
|
+
faraday (1.10.3)
|
198
190
|
faraday-em_http (~> 1.0)
|
199
191
|
faraday-em_synchrony (~> 1.0)
|
200
192
|
faraday-excon (~> 1.1)
|
@@ -223,7 +215,7 @@ GEM
|
|
223
215
|
faraday_middleware (1.2.0)
|
224
216
|
faraday (~> 1.0)
|
225
217
|
filesize (0.2.0)
|
226
|
-
git (1.
|
218
|
+
git (1.13.1)
|
227
219
|
addressable (~> 2.8)
|
228
220
|
rchardet (~> 1.8)
|
229
221
|
hpricot (0.8.6)
|
@@ -234,38 +226,38 @@ GEM
|
|
234
226
|
inifile (3.0.0)
|
235
227
|
jaro_winkler (1.5.4)
|
236
228
|
minitar (0.9)
|
237
|
-
minitest (5.
|
238
|
-
multipart-post (2.
|
229
|
+
minitest (5.17.0)
|
230
|
+
multipart-post (2.3.0)
|
239
231
|
net-ssh (4.2.0)
|
240
|
-
nokogiri (1.
|
232
|
+
nokogiri (1.14.0-x86_64-linux)
|
241
233
|
racc (~> 1.4)
|
242
234
|
ofx-parser (1.1.0)
|
243
235
|
hpricot (>= 0.6)
|
244
236
|
os (1.1.4)
|
245
237
|
parallel (1.22.1)
|
246
238
|
parseconfig (1.1.2)
|
247
|
-
parser (3.
|
239
|
+
parser (3.2.0.0)
|
248
240
|
ast (~> 2.4.1)
|
249
241
|
parslet (2.0.0)
|
250
|
-
public_suffix (5.0.
|
251
|
-
racc (1.6.
|
252
|
-
rack (
|
242
|
+
public_suffix (5.0.1)
|
243
|
+
racc (1.6.2)
|
244
|
+
rack (3.0.4.1)
|
253
245
|
rainbow (3.1.1)
|
254
246
|
rchardet (1.8.0)
|
255
247
|
rexml (3.2.5)
|
256
|
-
rspec (3.
|
257
|
-
rspec-core (~> 3.
|
258
|
-
rspec-expectations (~> 3.
|
259
|
-
rspec-mocks (~> 3.
|
260
|
-
rspec-core (3.
|
261
|
-
rspec-support (~> 3.
|
262
|
-
rspec-expectations (3.
|
248
|
+
rspec (3.12.0)
|
249
|
+
rspec-core (~> 3.12.0)
|
250
|
+
rspec-expectations (~> 3.12.0)
|
251
|
+
rspec-mocks (~> 3.12.0)
|
252
|
+
rspec-core (3.12.0)
|
253
|
+
rspec-support (~> 3.12.0)
|
254
|
+
rspec-expectations (3.12.2)
|
263
255
|
diff-lcs (>= 1.2.0, < 2.0)
|
264
|
-
rspec-support (~> 3.
|
265
|
-
rspec-mocks (3.
|
256
|
+
rspec-support (~> 3.12.0)
|
257
|
+
rspec-mocks (3.12.3)
|
266
258
|
diff-lcs (>= 1.2.0, < 2.0)
|
267
|
-
rspec-support (~> 3.
|
268
|
-
rspec-support (3.
|
259
|
+
rspec-support (~> 3.12.0)
|
260
|
+
rspec-support (3.12.0)
|
269
261
|
rubocop (0.80.1)
|
270
262
|
jaro_winkler (~> 1.5.1)
|
271
263
|
parallel (~> 1.10)
|
@@ -286,7 +278,7 @@ GEM
|
|
286
278
|
selenium-webdriver (3.142.7)
|
287
279
|
childprocess (>= 0.5, < 4.0)
|
288
280
|
rubyzip (>= 1.2.2)
|
289
|
-
taglib-ruby (1.1.
|
281
|
+
taglib-ruby (1.1.3)
|
290
282
|
telegram-bot-ruby (0.19.2)
|
291
283
|
dry-inflector
|
292
284
|
faraday (~> 1.0)
|
@@ -294,24 +286,24 @@ GEM
|
|
294
286
|
thread_safe (0.3.6)
|
295
287
|
tzinfo (2.0.5)
|
296
288
|
concurrent-ruby (~> 1.0)
|
289
|
+
ultimate_lyrics (0.1.3)
|
290
|
+
aranha-parsers (~> 0.10)
|
291
|
+
eac_ruby_utils (~> 0.102, >= 0.102.1)
|
297
292
|
unicode-display_width (1.6.1)
|
298
293
|
virtus (2.0.0)
|
299
294
|
axiom-types (~> 0.1)
|
300
295
|
coercible (~> 1.0)
|
301
296
|
descendants_tracker (~> 0.0, >= 0.0.3)
|
302
|
-
zeitwerk (2.6.
|
297
|
+
zeitwerk (2.6.6)
|
303
298
|
zlib (2.1.1)
|
304
299
|
|
305
300
|
PLATFORMS
|
306
301
|
x86_64-linux
|
307
302
|
|
308
303
|
DEPENDENCIES
|
309
|
-
aranha-parsers!
|
310
304
|
aranha-selenium!
|
311
305
|
eac_cli!
|
312
|
-
eac_config!
|
313
306
|
eac_docker!
|
314
|
-
eac_fs!
|
315
307
|
eac_ruby_base0!
|
316
308
|
eac_ruby_gem_support (~> 0.3)
|
317
309
|
eac_ruby_utils!
|
@@ -319,7 +311,6 @@ DEPENDENCIES
|
|
319
311
|
ehbrs-tools!
|
320
312
|
ehbrs_ruby_utils!
|
321
313
|
httpclient!
|
322
|
-
ultimate_lyrics!
|
323
314
|
|
324
315
|
BUNDLED WITH
|
325
|
-
2.3.
|
316
|
+
2.3.26
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'ehbrs_ruby_utils/music/ous/album'
|
4
|
-
require 'ehbrs_ruby_utils/
|
4
|
+
require 'ehbrs_ruby_utils/circular_list_spreader'
|
5
5
|
require 'ehbrs/tools/runner/fs/selected'
|
6
6
|
|
7
7
|
module Ehbrs
|
@@ -25,7 +25,7 @@ module Ehbrs
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def spreader_uncached
|
28
|
-
::EhbrsRubyUtils::
|
28
|
+
::EhbrsRubyUtils::CircularListSpreader.new(albums)
|
29
29
|
end
|
30
30
|
|
31
31
|
def albums
|
@@ -35,8 +35,15 @@ module Ehbrs
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def run_patch(source_path, ips_path, output_path)
|
38
|
-
::Ehbrs::Executables.flips.command
|
39
|
-
|
38
|
+
command = ::Ehbrs::Executables.flips.command
|
39
|
+
.append(['--apply', ips_path, source_path, output_path])
|
40
|
+
|
41
|
+
command.system!
|
42
|
+
|
43
|
+
return if output_path.exist?
|
44
|
+
|
45
|
+
fatal_error("\"#{command}\" exited without error, but output file \"#{output_path}\"" \
|
46
|
+
'does not exist')
|
40
47
|
end
|
41
48
|
|
42
49
|
def run_patches
|
@@ -0,0 +1,69 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'eac_ruby_base0/core_ext'
|
5
|
+
require 'ehbrs_ruby_utils/videos/opensubtitles/processors/episode'
|
6
|
+
require 'ehbrs_ruby_utils/videos/opensubtitles/processors/title'
|
7
|
+
|
8
|
+
module Ehbrs
|
9
|
+
module Tools
|
10
|
+
class Runner
|
11
|
+
class Videos
|
12
|
+
class Opensubtitles
|
13
|
+
runner_with :help, :output do
|
14
|
+
arg_opt '-C', '--target-path', 'Caminho para extração dos arquivos', default: '.'
|
15
|
+
bool_opt '-H', '--html', 'Formata URLs como links HTML.'
|
16
|
+
bool_opt '-e', '--episode', 'Processa como episódio em vez de título.'
|
17
|
+
bool_opt '-d', '--download', 'Baixa os links em vez mostrá-los.'
|
18
|
+
pos_arg :url
|
19
|
+
end
|
20
|
+
|
21
|
+
def run
|
22
|
+
parsed.download? ? run_download : run_output
|
23
|
+
end
|
24
|
+
|
25
|
+
def run_download
|
26
|
+
subtitles.map { |sub| download_sub(sub) }
|
27
|
+
end
|
28
|
+
|
29
|
+
def output_content
|
30
|
+
subtitles.map { |v| "#{format_url(v.source_uri)}\n" }.join
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def download_sub(sub)
|
36
|
+
infov 'Downloading', sub.source_uri
|
37
|
+
::EacRubyUtils::Envs.local.command('wget', '--continue', sub.source_uri).system!
|
38
|
+
end
|
39
|
+
|
40
|
+
def subtitles_uncached
|
41
|
+
if parsed.episode?
|
42
|
+
subtitles_from_episode
|
43
|
+
else
|
44
|
+
subtitles_from_title
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def subtitles_from_episode
|
49
|
+
::EhbrsRubyUtils::Videos::Opensubtitles::Processors::Episode
|
50
|
+
.new(parsed.url, target_path: parsed.target_path)
|
51
|
+
.subtitles
|
52
|
+
end
|
53
|
+
|
54
|
+
def subtitles_from_title
|
55
|
+
::EhbrsRubyUtils::Videos::Opensubtitles::Processors::Title
|
56
|
+
.new(parsed.url, target_path: parsed.target_path)
|
57
|
+
.episodes.flat_map(&:subtitles)
|
58
|
+
end
|
59
|
+
|
60
|
+
def format_url(url)
|
61
|
+
return url unless parsed.html?
|
62
|
+
|
63
|
+
"<a href=\"#{url}\">#{url}</a><br/>"
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
data/lib/ehbrs/tools/version.rb
CHANGED
@@ -5,13 +5,13 @@
|
|
5
5
|
:codec_long_name: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
|
6
6
|
:profile: Constrained Baseline
|
7
7
|
:codec_type: video
|
8
|
-
:codec_time_base: 1/50
|
9
8
|
:codec_tag_string: avc1
|
10
9
|
:codec_tag: '0x31637661'
|
11
10
|
:width: 352
|
12
11
|
:height: 288
|
13
12
|
:coded_width: 352
|
14
13
|
:coded_height: 288
|
14
|
+
:closed_captions: 0
|
15
15
|
:has_b_frames: 0
|
16
16
|
:sample_aspect_ratio: '1:1'
|
17
17
|
:display_aspect_ratio: '11:9'
|
@@ -47,12 +47,12 @@
|
|
47
47
|
:tags:
|
48
48
|
:language: und
|
49
49
|
:handler_name: VideoHandler
|
50
|
+
:vendor_id: "[0][0][0][0]"
|
50
51
|
- :index: 1
|
51
52
|
:codec_name: aac
|
52
53
|
:codec_long_name: AAC (Advanced Audio Coding)
|
53
54
|
:profile: LC
|
54
55
|
:codec_type: audio
|
55
|
-
:codec_time_base: 1/44100
|
56
56
|
:codec_tag_string: mp4a
|
57
57
|
:codec_tag: '0x6134706d'
|
58
58
|
:sample_fmt: fltp
|
@@ -68,7 +68,6 @@
|
|
68
68
|
:duration_ts: 299008
|
69
69
|
:duration: '6.780227'
|
70
70
|
:bit_rate: '95999'
|
71
|
-
:max_bit_rate: '100304'
|
72
71
|
:nb_frames: '292'
|
73
72
|
:disposition:
|
74
73
|
:default: 1
|
@@ -87,6 +86,7 @@
|
|
87
86
|
:creation_time: '2015-05-17T06:08:17.000000Z'
|
88
87
|
:language: und
|
89
88
|
:handler_name: IsoMedia File Produced by Google, 5-11-2011
|
89
|
+
:vendor_id: "[0][0][0][0]"
|
90
90
|
:format:
|
91
91
|
:filename: "%%PATH%%"
|
92
92
|
:nb_streams: 2
|
@@ -5,13 +5,13 @@
|
|
5
5
|
:codec_long_name: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
|
6
6
|
:profile: Constrained Baseline
|
7
7
|
:codec_type: video
|
8
|
-
:codec_time_base: 1/50
|
9
8
|
:codec_tag_string: "[0][0][0][0]"
|
10
9
|
:codec_tag: '0x0000'
|
11
10
|
:width: 352
|
12
11
|
:height: 288
|
13
12
|
:coded_width: 352
|
14
13
|
:coded_height: 288
|
14
|
+
:closed_captions: 0
|
15
15
|
:has_b_frames: 0
|
16
16
|
:sample_aspect_ratio: '1:1'
|
17
17
|
:display_aspect_ratio: '11:9'
|
@@ -42,13 +42,13 @@
|
|
42
42
|
:attached_pic: 0
|
43
43
|
:timed_thumbnails: 0
|
44
44
|
:tags:
|
45
|
+
:VENDOR_ID: "[0][0][0][0]"
|
45
46
|
:DURATION: '00:00:06.743000000'
|
46
47
|
- :index: 1
|
47
48
|
:codec_name: aac
|
48
49
|
:codec_long_name: AAC (Advanced Audio Coding)
|
49
50
|
:profile: LC
|
50
51
|
:codec_type: audio
|
51
|
-
:codec_time_base: 1/44100
|
52
52
|
:codec_tag_string: "[0][0][0][0]"
|
53
53
|
:codec_tag: '0x0000'
|
54
54
|
:sample_fmt: fltp
|
@@ -75,6 +75,7 @@
|
|
75
75
|
:attached_pic: 0
|
76
76
|
:timed_thumbnails: 0
|
77
77
|
:tags:
|
78
|
+
:VENDOR_ID: "[0][0][0][0]"
|
78
79
|
:DURATION: '00:00:06.803000000'
|
79
80
|
:format:
|
80
81
|
:nb_streams: 2
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ehbrs-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.33.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avm-tools
|
@@ -16,74 +16,68 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.145'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.145.1
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
29
|
+
version: '0.145'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.145.1
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: eac_cli
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
39
|
+
version: '0.30'
|
34
40
|
- - ">="
|
35
41
|
- !ruby/object:Gem::Version
|
36
|
-
version: 0.
|
42
|
+
version: 0.30.1
|
37
43
|
type: :runtime
|
38
44
|
prerelease: false
|
39
45
|
version_requirements: !ruby/object:Gem::Requirement
|
40
46
|
requirements:
|
41
47
|
- - "~>"
|
42
48
|
- !ruby/object:Gem::Version
|
43
|
-
version: '0.
|
49
|
+
version: '0.30'
|
44
50
|
- - ">="
|
45
51
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.
|
52
|
+
version: 0.30.1
|
47
53
|
- !ruby/object:Gem::Dependency
|
48
54
|
name: eac_ruby_utils
|
49
55
|
requirement: !ruby/object:Gem::Requirement
|
50
56
|
requirements:
|
51
57
|
- - "~>"
|
52
58
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0.
|
54
|
-
- - ">="
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: 0.102.1
|
59
|
+
version: '0.112'
|
57
60
|
type: :runtime
|
58
61
|
prerelease: false
|
59
62
|
version_requirements: !ruby/object:Gem::Requirement
|
60
63
|
requirements:
|
61
64
|
- - "~>"
|
62
65
|
- !ruby/object:Gem::Version
|
63
|
-
version: '0.
|
64
|
-
- - ">="
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: 0.102.1
|
66
|
+
version: '0.112'
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: ehbrs_ruby_utils
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
71
|
- - "~>"
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: '0.
|
74
|
-
- - ">="
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: 0.17.3
|
73
|
+
version: '0.19'
|
77
74
|
type: :runtime
|
78
75
|
prerelease: false
|
79
76
|
version_requirements: !ruby/object:Gem::Requirement
|
80
77
|
requirements:
|
81
78
|
- - "~>"
|
82
79
|
- !ruby/object:Gem::Version
|
83
|
-
version: '0.
|
84
|
-
- - ">="
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: 0.17.3
|
80
|
+
version: '0.19'
|
87
81
|
- !ruby/object:Gem::Dependency
|
88
82
|
name: filesize
|
89
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -232,6 +226,7 @@ files:
|
|
232
226
|
- lib/ehbrs/tools/runner/vg/wii.rb
|
233
227
|
- lib/ehbrs/tools/runner/videos.rb
|
234
228
|
- lib/ehbrs/tools/runner/videos/extract.rb
|
229
|
+
- lib/ehbrs/tools/runner/videos/opensubtitles.rb
|
235
230
|
- lib/ehbrs/tools/runner/videos/probe.rb
|
236
231
|
- lib/ehbrs/tools/runner/videos/series.rb
|
237
232
|
- lib/ehbrs/tools/runner/videos/series/rename.rb
|
@@ -339,33 +334,33 @@ signing_key:
|
|
339
334
|
specification_version: 4
|
340
335
|
summary: Tools for EHB/RS.
|
341
336
|
test_files:
|
342
|
-
- spec/spec_helper
|
343
|
-
- spec/spec_helper/videos.rb
|
337
|
+
- spec/spec_helper.rb
|
344
338
|
- spec/lib/ehbrs/observers/base_spec.rb
|
345
|
-
- spec/lib/ehbrs/tools/runner/fs/used_space_spec.rb
|
346
|
-
- spec/lib/ehbrs/tools/runner/videos/unsupported_spec.rb
|
347
|
-
- spec/lib/ehbrs/tools/runner/videos/probe_spec.rb
|
348
|
-
- spec/lib/ehbrs/tools/runner/videos/probe_spec_files/fixed.target.yaml
|
349
|
-
- spec/lib/ehbrs/tools/runner/videos/unsupported_spec_files/dts_audio.probe.yaml
|
350
|
-
- spec/lib/ehbrs/tools/runner/vg/ips_spec.rb
|
351
|
-
- spec/lib/ehbrs/tools/runner/vg/ips_spec_files/expected.rom
|
352
|
-
- spec/lib/ehbrs/tools/runner/vg/ips_spec_files/source.rom
|
353
|
-
- spec/lib/ehbrs/tools/runner/vg/ips_spec_files/patch_1.ips
|
354
|
-
- spec/lib/ehbrs/tools/runner/vg/ips_spec_files/patch_0.ips
|
355
|
-
- spec/lib/ehbrs/tools/runner_spec.rb
|
356
|
-
- spec/lib/ehbrs/cooking_book/recipe/measure_spec.rb
|
357
339
|
- spec/lib/ehbrs/vg/wii/wit/path_spec.rb
|
358
340
|
- spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec.rb
|
341
|
+
- spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_pal_iso.source.witdump
|
342
|
+
- spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.target.yaml
|
359
343
|
- spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_pal_iso.target.yaml
|
360
|
-
- spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.source.witdump
|
361
|
-
- spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_R92P01_wia.source.witdump
|
362
344
|
- spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/super_mario_galaxy_wbfs.target.yaml
|
363
|
-
- spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.target.yaml
|
364
345
|
- spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/super_mario_galaxy_wbfs.source.witdump
|
365
346
|
- spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_R92P01_wia.target.yaml
|
366
|
-
- spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/
|
347
|
+
- spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.source.witdump
|
348
|
+
- spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_R92P01_wia.source.witdump
|
367
349
|
- spec/lib/ehbrs/vg/wii/game_file_spec.rb
|
368
|
-
- spec/
|
350
|
+
- spec/lib/ehbrs/cooking_book/recipe/measure_spec.rb
|
351
|
+
- spec/lib/ehbrs/tools/runner_spec.rb
|
352
|
+
- spec/lib/ehbrs/tools/runner/vg/ips_spec_files/source.rom
|
353
|
+
- spec/lib/ehbrs/tools/runner/vg/ips_spec_files/patch_1.ips
|
354
|
+
- spec/lib/ehbrs/tools/runner/vg/ips_spec_files/patch_0.ips
|
355
|
+
- spec/lib/ehbrs/tools/runner/vg/ips_spec_files/expected.rom
|
356
|
+
- spec/lib/ehbrs/tools/runner/vg/ips_spec.rb
|
357
|
+
- spec/lib/ehbrs/tools/runner/videos/unsupported_spec.rb
|
358
|
+
- spec/lib/ehbrs/tools/runner/videos/unsupported_spec_files/dts_audio.probe.yaml
|
359
|
+
- spec/lib/ehbrs/tools/runner/videos/probe_spec.rb
|
360
|
+
- spec/lib/ehbrs/tools/runner/videos/probe_spec_files/fixed.target.yaml
|
361
|
+
- spec/lib/ehbrs/tools/runner/fs/used_space_spec.rb
|
369
362
|
- spec/code/rubocop_spec.rb
|
363
|
+
- spec/spec_helper/videos_files/stub_source.mp4
|
364
|
+
- spec/spec_helper/videos.rb
|
370
365
|
- ".rubocop.yml"
|
371
366
|
- ".rspec"
|