ehbrs-tools 0.37.0 → 0.39.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -5
- data/Gemfile.lock +97 -60
- data/exe/ehbrs +1 -1
- data/lib/ehbrs/executables.rb +1 -8
- data/lib/ehbrs/google/translate/session.rb +1 -1
- data/lib/ehbrs/observers/base.rb +2 -3
- data/lib/ehbrs/observers/with_persistence.rb +1 -1
- data/lib/ehbrs/self/observers/with_persistence.rb +1 -1
- data/lib/ehbrs/tools/runner/finances/bb_browser.rb +4 -4
- data/lib/ehbrs/tools/runner/fs/used_space.rb +1 -1
- data/lib/ehbrs/tools/runner/google/translate.rb +1 -1
- data/lib/ehbrs/tools/runner/telegram/send_message.rb +3 -3
- data/lib/ehbrs/tools/runner/vg/ips.rb +2 -2
- data/lib/ehbrs/tools/runner/vg/ps2/rename.rb +34 -0
- data/lib/ehbrs/tools/runner/vg/ps2.rb +19 -0
- data/lib/ehbrs/tools/runner/videos/languages/file_runner.rb +2 -1
- data/lib/ehbrs/tools/runner/videos/languages.rb +1 -1
- data/lib/ehbrs/tools/runner/videos/series/rename.rb +1 -1
- data/lib/ehbrs/tools/runner/videos/subtitles/sanitize.rb +38 -0
- data/lib/ehbrs/tools/runner/videos/subtitles.rb +20 -0
- data/lib/ehbrs/tools/runner/videos/unsupported.rb +1 -1
- data/lib/ehbrs/tools/runner/web_utils/videos/upload.rb +1 -1
- data/lib/ehbrs/tools/runner_with/filesystem_renamer.rb +103 -0
- data/lib/ehbrs/tools/runner_with.rb +11 -0
- data/lib/ehbrs/tools/version.rb +1 -1
- data/lib/ehbrs/user_dirs.rb +1 -1
- data/lib/ehbrs/videos/convert_job.rb +3 -3
- data/lib/ehbrs/videos/extract/package_file.rb +1 -1
- data/lib/ehbrs/videos/file.rb +2 -2
- data/lib/ehbrs/videos/track.rb +3 -2
- data/lib/ehbrs/videos/unsupported/check_support.rb +5 -7
- data/lib/ehbrs/videos/unsupported/profiles/samsung.rb +1 -0
- metadata +20 -71
- data/.rspec +0 -1
- data/.rubocop.yml +0 -39
- data/lib/ehbrs/gems.rb +0 -37
- data/spec/code/rubocop_spec.rb +0 -3
- data/spec/lib/ehbrs/observers/base_spec.rb +0 -93
- data/spec/lib/ehbrs/tools/runner/fs/used_space_spec.rb +0 -62
- data/spec/lib/ehbrs/tools/runner/vg/ips_spec.rb +0 -31
- data/spec/lib/ehbrs/tools/runner/vg/ips_spec_files/expected.rom +0 -0
- data/spec/lib/ehbrs/tools/runner/vg/ips_spec_files/patch_0.ips +0 -0
- data/spec/lib/ehbrs/tools/runner/vg/ips_spec_files/patch_1.ips +0 -0
- data/spec/lib/ehbrs/tools/runner/vg/ips_spec_files/source.rom +0 -0
- data/spec/lib/ehbrs/tools/runner/videos/probe_spec.rb +0 -19
- data/spec/lib/ehbrs/tools/runner/videos/probe_spec_files/fixed.target.yaml +0 -105
- data/spec/lib/ehbrs/tools/runner/videos/unsupported_spec.rb +0 -75
- data/spec/lib/ehbrs/tools/runner/videos/unsupported_spec_files/dts_audio.probe.yaml +0 -91
- data/spec/lib/ehbrs/tools/runner_spec.rb +0 -16
- data/spec/spec_helper/videos.rb +0 -30
- data/spec/spec_helper/videos_files/stub_source.mp4 +0 -0
- data/spec/spec_helper.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05eba951b36f326e76fa27e5264caecd9533f10ce8ec1f3775c6b6b10be3678b
|
4
|
+
data.tar.gz: 1c6caca39da80381d76cd9cee1f8f40989b428d19e3a0d749e7cbf9fdb4f99b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38e39c046a9c1ba26c2624d3ba7769100ad1b4941c1bdac7eaa58d48d2d75da80d02c75fb99d94051498cd6efb245f650139ef70df978a4111e7327e4a118595
|
7
|
+
data.tar.gz: acbaed41a43a3e7a9c9dea2afdddaf2704eee2033f208e3d400b739a484ba15c832f4c1fffafdd36d4797391d4d78762824c2d4a8481ed77711245515c27c07a
|
data/Gemfile
CHANGED
@@ -4,11 +4,11 @@ source 'https://rubygems.org'
|
|
4
4
|
|
5
5
|
gemspec
|
6
6
|
|
7
|
-
|
8
|
-
next unless
|
7
|
+
Dir["#{File.join(__dir__, 'sub')}/*"].each do |dir|
|
8
|
+
next unless File.exist?(File.join(dir, "#{File.basename(dir)}.gemspec"))
|
9
9
|
|
10
|
-
gem
|
10
|
+
gem File.basename(dir), path: dir, require: false
|
11
11
|
end
|
12
12
|
|
13
|
-
local_gemfile =
|
14
|
-
eval_gemfile local_gemfile if
|
13
|
+
local_gemfile = File.join(File.dirname(__FILE__), 'Gemfile.local')
|
14
|
+
eval_gemfile local_gemfile if File.exist?(local_gemfile)
|
data/Gemfile.lock
CHANGED
@@ -1,29 +1,39 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ehbrs-tools (0.
|
5
|
-
avm-tools (~> 0.
|
6
|
-
eac_cli (~> 0.
|
7
|
-
eac_ruby_utils (~> 0.
|
8
|
-
ehbrs_ruby_utils (~> 0.
|
4
|
+
ehbrs-tools (0.39.0)
|
5
|
+
avm-tools (~> 0.159)
|
6
|
+
eac_cli (~> 0.40)
|
7
|
+
eac_ruby_utils (~> 0.120)
|
8
|
+
ehbrs_ruby_utils (~> 0.38)
|
9
9
|
filesize (~> 0.2)
|
10
|
-
inifile (~> 3.0)
|
11
10
|
os (~> 1.1, >= 1.1.4)
|
12
11
|
telegram-bot-ruby (~> 0.23)
|
13
12
|
|
13
|
+
PATH
|
14
|
+
remote: sub/eac_cli
|
15
|
+
specs:
|
16
|
+
eac_cli (0.40.0)
|
17
|
+
colorize (~> 0.8, >= 0.8.1)
|
18
|
+
eac_config (~> 0.14, >= 0.14.1)
|
19
|
+
eac_ruby_utils (~> 0.120)
|
20
|
+
tty-table (~> 0.12)
|
21
|
+
|
14
22
|
PATH
|
15
23
|
remote: sub/ehbrs_ruby_utils
|
16
24
|
specs:
|
17
|
-
ehbrs_ruby_utils (0.
|
25
|
+
ehbrs_ruby_utils (0.38.0)
|
18
26
|
aranha (~> 0.19, >= 0.19.2)
|
19
|
-
aranha-parsers (~> 0.
|
27
|
+
aranha-parsers (~> 0.22)
|
20
28
|
aranha-selenium (~> 0.7)
|
21
|
-
avm (~> 0.
|
29
|
+
avm (~> 0.84, >= 0.84.2)
|
22
30
|
dentaku (~> 3.5, >= 3.5.1)
|
23
31
|
eac_fs (~> 0.16)
|
24
32
|
eac_rest (~> 0.10)
|
25
|
-
eac_ruby_utils (~> 0.
|
33
|
+
eac_ruby_utils (~> 0.120)
|
26
34
|
eac_templates (~> 0.5)
|
35
|
+
inifile (~> 3.0)
|
36
|
+
srt (~> 0.1, >= 0.1.5)
|
27
37
|
taglib-ruby (~> 1.1, >= 1.1.3)
|
28
38
|
ultimate_lyrics (~> 0.1, >= 0.1.3)
|
29
39
|
|
@@ -42,35 +52,35 @@ GEM
|
|
42
52
|
aranha-parsers (~> 0.18)
|
43
53
|
aranha-selenium (~> 0.5)
|
44
54
|
eac_ruby_utils (~> 0.116)
|
45
|
-
aranha-parsers (0.
|
55
|
+
aranha-parsers (0.22.0)
|
46
56
|
activesupport (>= 4.0.0)
|
47
|
-
addressable (~> 2.8, >= 2.8.
|
48
|
-
eac_envs-http (~> 0.4)
|
49
|
-
eac_ruby_utils (~> 0.
|
50
|
-
nokogiri (~> 1.15, >= 1.15.
|
57
|
+
addressable (~> 2.8, >= 2.8.5)
|
58
|
+
eac_envs-http (~> 0.4, >= 0.4.1)
|
59
|
+
eac_ruby_utils (~> 0.119, >= 0.119.2)
|
60
|
+
nokogiri (~> 1.15, >= 1.15.4)
|
51
61
|
ofx-parser (~> 1.1)
|
52
62
|
aranha-selenium (0.7.0)
|
53
63
|
eac_ruby_utils (~> 0.117, >= 0.117.1)
|
54
64
|
selenium-webdriver (~> 3.142, >= 3.142.7)
|
55
65
|
ast (2.4.2)
|
56
|
-
avm (0.
|
57
|
-
aranha-parsers (~> 0.
|
58
|
-
eac_cli (~> 0.
|
66
|
+
avm (0.84.2)
|
67
|
+
aranha-parsers (~> 0.22)
|
68
|
+
eac_cli (~> 0.39)
|
59
69
|
eac_config (~> 0.14, >= 0.14.1)
|
60
70
|
eac_docker (~> 0.7)
|
61
71
|
eac_fs (~> 0.16)
|
62
72
|
eac_git (~> 0.14, >= 0.14.1)
|
63
|
-
eac_ruby_utils (~> 0.
|
73
|
+
eac_ruby_utils (~> 0.120)
|
64
74
|
eac_templates (~> 0.5)
|
65
75
|
filesize (~> 0.2)
|
66
76
|
htmlbeautifier (~> 1.4, >= 1.4.2)
|
67
77
|
minitar (~> 0.9)
|
68
|
-
avm-eac_generic_base0 (0.12.
|
69
|
-
avm (~> 0.
|
70
|
-
eac_ruby_utils (~> 0.
|
71
|
-
avm-eac_ruby_base1 (0.
|
72
|
-
aranha-parsers (~> 0.
|
73
|
-
avm (~> 0.
|
78
|
+
avm-eac_generic_base0 (0.12.2)
|
79
|
+
avm (~> 0.84, >= 0.84.2)
|
80
|
+
eac_ruby_utils (~> 0.120)
|
81
|
+
avm-eac_ruby_base1 (0.33.1)
|
82
|
+
aranha-parsers (~> 0.22)
|
83
|
+
avm (~> 0.84)
|
74
84
|
avm-eac_generic_base0 (~> 0.12, >= 0.12.1)
|
75
85
|
eac_envs-http (~> 0.4, >= 0.4.1)
|
76
86
|
eac_ruby_utils (~> 0.119, >= 0.119.2)
|
@@ -84,19 +94,19 @@ GEM
|
|
84
94
|
eac_fs (~> 0.16)
|
85
95
|
eac_ruby_utils (~> 0.112)
|
86
96
|
eac_templates (~> 0.5)
|
87
|
-
avm-git (0.
|
88
|
-
avm (~> 0.
|
97
|
+
avm-git (0.14.0)
|
98
|
+
avm (~> 0.82)
|
89
99
|
avm-files (~> 0.6, >= 0.6.2)
|
90
100
|
eac_git (~> 0.14, >= 0.14.1)
|
91
|
-
eac_ruby_utils (~> 0.119, >= 0.119.
|
101
|
+
eac_ruby_utils (~> 0.119, >= 0.119.2)
|
92
102
|
git (~> 1.18)
|
93
|
-
avm-tools (0.
|
103
|
+
avm-tools (0.159.0)
|
94
104
|
aranha-parsers (~> 0.21)
|
95
|
-
avm (~> 0.
|
96
|
-
avm-eac_ruby_base1 (~> 0.
|
105
|
+
avm (~> 0.83)
|
106
|
+
avm-eac_ruby_base1 (~> 0.33)
|
97
107
|
avm-eac_ubuntu_base0 (~> 0.5)
|
98
108
|
avm-files (~> 0.6, >= 0.6.2)
|
99
|
-
avm-git (~> 0.
|
109
|
+
avm-git (~> 0.14)
|
100
110
|
clipboard (~> 1.3, >= 1.3.6)
|
101
111
|
curb (~> 0.9, >= 0.9.11)
|
102
112
|
eac_git (~> 0.14, >= 0.14.1)
|
@@ -108,7 +118,7 @@ GEM
|
|
108
118
|
descendants_tracker (~> 0.0.4)
|
109
119
|
ice_nine (~> 0.11.0)
|
110
120
|
thread_safe (~> 0.3, >= 0.3.1)
|
111
|
-
base64 (0.
|
121
|
+
base64 (0.2.0)
|
112
122
|
childprocess (3.0.0)
|
113
123
|
clipboard (1.3.6)
|
114
124
|
coercible (1.0.0)
|
@@ -124,10 +134,6 @@ GEM
|
|
124
134
|
thread_safe (~> 0.3, >= 0.3.1)
|
125
135
|
diff-lcs (1.5.0)
|
126
136
|
dry-inflector (1.0.0)
|
127
|
-
eac_cli (0.38.0)
|
128
|
-
colorize (~> 0.8, >= 0.8.1)
|
129
|
-
eac_config (~> 0.14)
|
130
|
-
eac_ruby_utils (~> 0.119, >= 0.119.2)
|
131
137
|
eac_config (0.14.1)
|
132
138
|
addressable (~> 2.8, >= 2.8.5)
|
133
139
|
eac_ruby_utils (~> 0.119, >= 0.119.2)
|
@@ -158,13 +164,13 @@ GEM
|
|
158
164
|
eac_cli (~> 0.35)
|
159
165
|
eac_fs (~> 0.16)
|
160
166
|
eac_ruby_utils (~> 0.117)
|
161
|
-
eac_ruby_gem_support (0.
|
162
|
-
eac_ruby_utils (~> 0.
|
163
|
-
rspec (~> 3.
|
164
|
-
rubocop (~>
|
165
|
-
rubocop-rails (~> 2.
|
166
|
-
rubocop-rspec (~>
|
167
|
-
eac_ruby_utils (0.
|
167
|
+
eac_ruby_gem_support (0.9.0)
|
168
|
+
eac_ruby_utils (~> 0.119, >= 0.119.2)
|
169
|
+
rspec (~> 3.12)
|
170
|
+
rubocop (~> 1.57, >= 1.57.2)
|
171
|
+
rubocop-rails (~> 2.22, >= 2.22.1)
|
172
|
+
rubocop-rspec (~> 2.25)
|
173
|
+
eac_ruby_utils (0.120.0)
|
168
174
|
activesupport (>= 4, < 7)
|
169
175
|
addressable (~> 2.8, >= 2.8.5)
|
170
176
|
bundler
|
@@ -173,7 +179,7 @@ GEM
|
|
173
179
|
eac_templates (0.5.0)
|
174
180
|
eac_config (~> 0.12)
|
175
181
|
eac_ruby_utils (~> 0.112)
|
176
|
-
faraday (2.7.
|
182
|
+
faraday (2.7.12)
|
177
183
|
base64
|
178
184
|
faraday-net_http (>= 2.0, < 3.1)
|
179
185
|
ruby2_keywords (>= 0.0.4)
|
@@ -197,12 +203,13 @@ GEM
|
|
197
203
|
concurrent-ruby (~> 1.0)
|
198
204
|
ice_nine (0.11.2)
|
199
205
|
inifile (3.0.0)
|
200
|
-
|
206
|
+
json (2.6.3)
|
207
|
+
language_server-protocol (3.17.0.3)
|
201
208
|
minitar (0.9)
|
202
209
|
minitest (5.20.0)
|
203
210
|
multipart-post (2.3.0)
|
204
211
|
net-ssh (4.2.0)
|
205
|
-
nokogiri (1.15.
|
212
|
+
nokogiri (1.15.5-x86_64-linux)
|
206
213
|
racc (~> 1.4)
|
207
214
|
ofx-parser (1.1.0)
|
208
215
|
hpricot (>= 0.6)
|
@@ -213,11 +220,14 @@ GEM
|
|
213
220
|
ast (~> 2.4.1)
|
214
221
|
racc
|
215
222
|
parslet (2.0.0)
|
216
|
-
|
217
|
-
|
223
|
+
pastel (0.8.0)
|
224
|
+
tty-color (~> 0.5)
|
225
|
+
public_suffix (5.0.4)
|
226
|
+
racc (1.7.3)
|
218
227
|
rack (3.0.8)
|
219
228
|
rainbow (3.1.1)
|
220
229
|
rchardet (1.8.0)
|
230
|
+
regexp_parser (2.8.2)
|
221
231
|
rexml (3.2.6)
|
222
232
|
rspec (3.12.0)
|
223
233
|
rspec-core (~> 3.12.0)
|
@@ -232,19 +242,32 @@ GEM
|
|
232
242
|
diff-lcs (>= 1.2.0, < 2.0)
|
233
243
|
rspec-support (~> 3.12.0)
|
234
244
|
rspec-support (3.12.1)
|
235
|
-
rubocop (
|
236
|
-
|
245
|
+
rubocop (1.57.2)
|
246
|
+
json (~> 2.3)
|
247
|
+
language_server-protocol (>= 3.17.0)
|
237
248
|
parallel (~> 1.10)
|
238
|
-
parser (>= 2.
|
249
|
+
parser (>= 3.2.2.4)
|
239
250
|
rainbow (>= 2.2.2, < 4.0)
|
240
|
-
|
251
|
+
regexp_parser (>= 1.8, < 3.0)
|
252
|
+
rexml (>= 3.2.5, < 4.0)
|
253
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
241
254
|
ruby-progressbar (~> 1.7)
|
242
|
-
unicode-display_width (>=
|
243
|
-
rubocop-
|
255
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
256
|
+
rubocop-ast (1.30.0)
|
257
|
+
parser (>= 3.2.1.0)
|
258
|
+
rubocop-capybara (2.19.0)
|
259
|
+
rubocop (~> 1.41)
|
260
|
+
rubocop-factory_bot (2.24.0)
|
261
|
+
rubocop (~> 1.33)
|
262
|
+
rubocop-rails (2.22.2)
|
263
|
+
activesupport (>= 4.2.0)
|
244
264
|
rack (>= 1.1)
|
245
|
-
rubocop (>=
|
246
|
-
|
247
|
-
|
265
|
+
rubocop (>= 1.33.0, < 2.0)
|
266
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
267
|
+
rubocop-rspec (2.25.0)
|
268
|
+
rubocop (~> 1.40)
|
269
|
+
rubocop-capybara (~> 2.17)
|
270
|
+
rubocop-factory_bot (~> 2.22)
|
248
271
|
ruby-filemagic (0.7.3)
|
249
272
|
ruby-progressbar (1.13.0)
|
250
273
|
ruby2_keywords (0.0.5)
|
@@ -252,6 +275,12 @@ GEM
|
|
252
275
|
selenium-webdriver (3.142.7)
|
253
276
|
childprocess (>= 0.5, < 4.0)
|
254
277
|
rubyzip (>= 1.2.2)
|
278
|
+
srt (0.1.5)
|
279
|
+
strings (0.2.1)
|
280
|
+
strings-ansi (~> 0.2)
|
281
|
+
unicode-display_width (>= 1.5, < 3.0)
|
282
|
+
unicode_utils (~> 1.4)
|
283
|
+
strings-ansi (0.2.0)
|
255
284
|
taglib-ruby (1.1.3)
|
256
285
|
telegram-bot-ruby (0.23.0)
|
257
286
|
dry-inflector
|
@@ -259,12 +288,19 @@ GEM
|
|
259
288
|
faraday-multipart (~> 1.0)
|
260
289
|
virtus (~> 2.0)
|
261
290
|
thread_safe (0.3.6)
|
291
|
+
tty-color (0.6.0)
|
292
|
+
tty-screen (0.8.1)
|
293
|
+
tty-table (0.12.0)
|
294
|
+
pastel (~> 0.8)
|
295
|
+
strings (~> 0.2.0)
|
296
|
+
tty-screen (~> 0.8)
|
262
297
|
tzinfo (2.0.6)
|
263
298
|
concurrent-ruby (~> 1.0)
|
264
299
|
ultimate_lyrics (0.1.3)
|
265
300
|
aranha-parsers (~> 0.10)
|
266
301
|
eac_ruby_utils (~> 0.102, >= 0.102.1)
|
267
|
-
unicode-display_width (
|
302
|
+
unicode-display_width (2.5.0)
|
303
|
+
unicode_utils (1.4.0)
|
268
304
|
virtus (2.0.0)
|
269
305
|
axiom-types (~> 0.1)
|
270
306
|
coercible (~> 1.0)
|
@@ -276,7 +312,8 @@ PLATFORMS
|
|
276
312
|
x86_64-linux
|
277
313
|
|
278
314
|
DEPENDENCIES
|
279
|
-
|
315
|
+
eac_cli!
|
316
|
+
eac_ruby_gem_support (~> 0.9)
|
280
317
|
ehbrs-tools!
|
281
318
|
ehbrs_ruby_utils!
|
282
319
|
|
data/exe/ehbrs
CHANGED
data/lib/ehbrs/executables.rb
CHANGED
@@ -15,10 +15,7 @@ module Ehbrs
|
|
15
15
|
private
|
16
16
|
|
17
17
|
{
|
18
|
-
'
|
19
|
-
'-h' => %w[unzip],
|
20
|
-
'-version' => %w[ffmpeg],
|
21
|
-
'--version' => %w[flips tar wit]
|
18
|
+
'--version' => %w[flips]
|
22
19
|
}.each do |validate_arg, commands|
|
23
20
|
commands.each do |command|
|
24
21
|
define_method("#{command}_uncached") do
|
@@ -26,10 +23,6 @@ module Ehbrs
|
|
26
23
|
end
|
27
24
|
end
|
28
25
|
end
|
29
|
-
|
30
|
-
def sevenzip_uncached
|
31
|
-
env.executable('7z', '--help')
|
32
|
-
end
|
33
26
|
end
|
34
27
|
end
|
35
28
|
end
|
@@ -10,7 +10,7 @@ module Ehbrs
|
|
10
10
|
CLOSE_POPUP_CSS = '.dismiss-button'
|
11
11
|
FILE_INPUT_XPATH = '//*[@id = "tlid-file-input"]'
|
12
12
|
SUBMIT_XPATH = '//form[@action="//translate.googleusercontent.com/translate_f"]' \
|
13
|
-
|
13
|
+
'//input[@type="submit"]'
|
14
14
|
RESULT_XPATHS = [
|
15
15
|
'//script[contains(@src, "https://translate.google.com/translate_a")]',
|
16
16
|
'/html/body/pre'
|
data/lib/ehbrs/observers/base.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'eac_ruby_utils/core_ext'
|
4
|
-
require 'ostruct'
|
5
4
|
|
6
5
|
module Ehbrs
|
7
6
|
module Observers
|
@@ -45,12 +44,12 @@ module Ehbrs
|
|
45
44
|
def check_with_blank_value_add(value, time)
|
46
45
|
return false unless changing_value?(value)
|
47
46
|
|
48
|
-
records <<
|
47
|
+
records << { value: value, time: time }.to_struct
|
49
48
|
true
|
50
49
|
end
|
51
50
|
|
52
51
|
def check_with_blank_value_ignore(value, date)
|
53
|
-
|
52
|
+
false if value.blank? ? false : check_with_blank_value_add(value, date)
|
54
53
|
end
|
55
54
|
|
56
55
|
def check_with_blank_value_raise(value, date)
|
@@ -21,7 +21,7 @@ module Ehbrs
|
|
21
21
|
def load
|
22
22
|
save unless path.exist?
|
23
23
|
data = ::YAML.load_file(path.to_path)
|
24
|
-
@records = data.fetch(:records).map
|
24
|
+
@records = data.fetch(:records).map(&:to_struct)
|
25
25
|
@last_check_time = data.fetch(:last_check_time)
|
26
26
|
end
|
27
27
|
|
@@ -25,8 +25,8 @@ module Ehbrs
|
|
25
25
|
|
26
26
|
def docker_container_uncached
|
27
27
|
r = docker_image.container
|
28
|
-
|
29
|
-
|
28
|
+
.temporary(true).interactive(true).tty(true)
|
29
|
+
.command_arg('seg.bb.com.br')
|
30
30
|
%w[capabilities environment_variables volumes].inject(r) do |a, e|
|
31
31
|
send("docker_container_#{e}", a)
|
32
32
|
end
|
@@ -45,8 +45,8 @@ module Ehbrs
|
|
45
45
|
|
46
46
|
def docker_container_volumes(container)
|
47
47
|
{
|
48
|
-
::File.join(
|
49
|
-
::File.join(
|
48
|
+
::File.join(Dir.home, 'Downloads') => '/home/user/Downloads',
|
49
|
+
::File.join(Dir.home, '.Xauthority') => '/home/user/.Xauthority:ro',
|
50
50
|
'/tmp/.X11-unix' => '/tmp/.X11-unix:ro',
|
51
51
|
'/etc/machine-id' => '/etc/machine-id:ro'
|
52
52
|
}.inject(container) { |a, e| a.volume(e[0], e[1]) }
|
@@ -20,9 +20,9 @@ module Ehbrs
|
|
20
20
|
|
21
21
|
def message_sending_uncached
|
22
22
|
parsed.recipients_ids
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
.inject(::Ehbrs::Telegram::MessageSending.new) { |a, e| a.recipient_id(e) }
|
24
|
+
.bot_token(runner_context.call(:bot_token))
|
25
|
+
.message(parsed.message)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -36,14 +36,14 @@ module Ehbrs
|
|
36
36
|
|
37
37
|
def run_patch(source_path, ips_path, output_path)
|
38
38
|
command = ::Ehbrs::Executables.flips.command
|
39
|
-
|
39
|
+
.append(['--apply', ips_path, source_path, output_path])
|
40
40
|
|
41
41
|
command.system!
|
42
42
|
|
43
43
|
return if output_path.exist?
|
44
44
|
|
45
45
|
fatal_error("\"#{command}\" exited without error, but output file \"#{output_path}\"" \
|
46
|
-
|
46
|
+
'does not exist')
|
47
47
|
end
|
48
48
|
|
49
49
|
def run_patches
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'ehbrs_ruby_utils/vg/ps2/iso_file'
|
4
|
+
require 'eac_ruby_base0/core_ext'
|
5
|
+
|
6
|
+
module Ehbrs
|
7
|
+
module Tools
|
8
|
+
class Runner
|
9
|
+
class Vg
|
10
|
+
class Ps2
|
11
|
+
class Rename
|
12
|
+
DEFAULT_TRAVERSER_RECURSIVE = true
|
13
|
+
|
14
|
+
runner_with :help, :filesystem_renamer do
|
15
|
+
desc 'Renomeia ISOS de PS2'
|
16
|
+
end
|
17
|
+
|
18
|
+
# @return [void]
|
19
|
+
def run
|
20
|
+
run_filesystem_renamer
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
# @return [Class]
|
26
|
+
def file_class
|
27
|
+
::EhbrsRubyUtils::Vg::Ps2::IsoFile
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_base0/core_ext'
|
4
|
+
|
5
|
+
module Ehbrs
|
6
|
+
module Tools
|
7
|
+
class Runner
|
8
|
+
class Vg
|
9
|
+
class Ps2
|
10
|
+
runner_with :help, :subcommands do
|
11
|
+
subcommands
|
12
|
+
end
|
13
|
+
|
14
|
+
require_sub __FILE__
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'ehbrs_ruby_utils/executables'
|
4
5
|
|
5
6
|
module Ehbrs
|
6
7
|
module Tools
|
@@ -100,7 +101,7 @@ module Ehbrs
|
|
100
101
|
end
|
101
102
|
|
102
103
|
def extract_tracks_command_uncached
|
103
|
-
::
|
104
|
+
::EhbrsRubyUtils::Executables.ffmpeg.command(*extract_tracks_job_args)
|
104
105
|
end
|
105
106
|
end
|
106
107
|
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_base0/core_ext'
|
4
|
+
require 'ehbrs_ruby_utils/videos/subtitles/sanitize'
|
5
|
+
|
6
|
+
module Ehbrs
|
7
|
+
module Tools
|
8
|
+
class Runner
|
9
|
+
class Videos
|
10
|
+
class Subtitles
|
11
|
+
class Sanitize
|
12
|
+
runner_with :help, :filesystem_traverser do
|
13
|
+
desc 'Conserta legendas.'
|
14
|
+
end
|
15
|
+
|
16
|
+
def keep_languages?
|
17
|
+
keep_languages.present?
|
18
|
+
end
|
19
|
+
|
20
|
+
delegate :delete?, :extract?, to: :parsed
|
21
|
+
|
22
|
+
def run
|
23
|
+
run_filesystem_traverser
|
24
|
+
end
|
25
|
+
|
26
|
+
def traverser_check_file(file)
|
27
|
+
sub = ::EhbrsRubyUtils::Videos::Subtitles::Sanitize.new(file)
|
28
|
+
return unless sub.subtitle?
|
29
|
+
|
30
|
+
infov 'Subtitle found', sub.file
|
31
|
+
sub.run
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_base0/core_ext'
|
4
|
+
|
5
|
+
module Ehbrs
|
6
|
+
module Tools
|
7
|
+
class Runner
|
8
|
+
class Videos
|
9
|
+
class Subtitles
|
10
|
+
runner_with :help, :subcommands do
|
11
|
+
desc 'Ferramentas para seriados.'
|
12
|
+
subcommands
|
13
|
+
end
|
14
|
+
|
15
|
+
require_sub __FILE__
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -44,7 +44,7 @@ module Ehbrs
|
|
44
44
|
upload_request(files_list_path).body
|
45
45
|
rescue ::EhbrsRubyUtils::WebUtils::RequestError => e
|
46
46
|
system('firefox', e.body_file_path.to_path)
|
47
|
-
fatal_error(
|
47
|
+
fatal_error("Retornou com erro: #{e.message}")
|
48
48
|
end
|
49
49
|
|
50
50
|
def series_files_list_uncached
|