ehbrs-tools 0.14.0 → 0.16.2
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/ehbrs/runner.rb +4 -7
- data/lib/ehbrs/runner/finances.rb +4 -7
- data/lib/ehbrs/runner/finances/bb_browser.rb +5 -10
- data/lib/ehbrs/runner/fs.rb +4 -7
- data/lib/ehbrs/runner/fs/used_space.rb +4 -5
- data/lib/ehbrs/runner/google.rb +4 -7
- data/lib/ehbrs/runner/google/translate.rb +7 -12
- data/lib/ehbrs/runner/self.rb +4 -7
- data/lib/ehbrs/runner/self/test.rb +5 -10
- data/lib/ehbrs/runner/vg.rb +4 -7
- data/lib/ehbrs/runner/vg/ips.rb +9 -14
- data/lib/ehbrs/runner/vg/wii.rb +10 -13
- data/lib/ehbrs/runner/videos.rb +3 -5
- data/lib/ehbrs/runner/videos/extract.rb +10 -13
- data/lib/ehbrs/runner/videos/probe.rb +6 -9
- data/lib/ehbrs/runner/videos/series.rb +5 -8
- data/lib/ehbrs/runner/videos/series/rename.rb +9 -12
- data/lib/ehbrs/runner/videos/unsupported.rb +9 -13
- data/lib/ehbrs/runner/web_utils.rb +24 -0
- data/lib/ehbrs/runner/web_utils/videos.rb +18 -0
- data/lib/ehbrs/runner/web_utils/videos/download.rb +63 -0
- data/lib/ehbrs/runner/web_utils/videos/upload.rb +75 -0
- data/lib/ehbrs/tools/version.rb +1 -1
- data/lib/ehbrs/vg/wii/wit/parsers/dump.rb +10 -5
- data/lib/ehbrs/videos/file.rb +4 -8
- data/lib/ehbrs/videos/series/rename/file/options.rb +3 -13
- data/lib/ehbrs/videos/track.rb +20 -10
- data/lib/ehbrs/videos/unsupported/checks/codec_extra_unlisted.rb +2 -0
- data/lib/ehbrs/videos/unsupported/checks/codec_extra_unsupported.rb +2 -0
- data/lib/ehbrs/videos/unsupported/checks/codec_unlisted.rb +2 -0
- data/lib/ehbrs/videos/unsupported/checks/codec_unsupported.rb +2 -0
- data/lib/ehbrs/videos/unsupported/checks/invalid_extension.rb +2 -0
- data/lib/ehbrs/videos/unsupported/fix_profile.rb +1 -0
- data/lib/ehbrs/videos/unsupported/fixes/supported_codec.rb +1 -1
- data/lib/ehbrs/videos/unsupported/profiles/base.rb +17 -3
- data/lib/ehbrs/videos/unsupported/profiles/philco.rb +5 -4
- data/vendor/aranha-parsers/Gemfile +5 -0
- data/vendor/aranha-parsers/aranha-parsers.gemspec +23 -0
- data/vendor/aranha-parsers/lib/aranha/parsers.rb +9 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/base.rb +79 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/html.rb +11 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/html/base.rb +47 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/html/item.rb +24 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/html/item_list.rb +29 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/html/node.rb +13 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/html/node/base.rb +36 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/html/node/default.rb +126 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/invalid_state_exception.rb +8 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/patches.rb +11 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/patches/ofx_parser.rb +38 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/source_address.rb +55 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/source_address/file.rb +31 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/source_address/hash_http_get.rb +25 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/source_address/hash_http_post.rb +45 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/source_address/http_get.rb +49 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/source_target_fixtures.rb +77 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/spec/source_target_fixtures_example.rb +78 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/version.rb +7 -0
- data/vendor/aranha-parsers/spec/lib/aranha/parsers/source_address/http_get_spec.rb +21 -0
- data/vendor/aranha-parsers/spec/lib/aranha/parsers/source_address_spec.rb +74 -0
- data/vendor/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb +27 -0
- data/vendor/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec_files/stub1.source.txt +1 -0
- data/vendor/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec_files/stub1.target.html +1 -0
- data/vendor/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec_files/stub2.source.html +1 -0
- data/vendor/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec_files/stub3.target.yaml +1 -0
- data/vendor/aranha-parsers/spec/lib/rubocop_check_spec.rb +7 -0
- data/vendor/aranha-parsers/spec/spec_helper.rb +8 -0
- data/vendor/eac_cli/eac_cli.gemspec +1 -1
- data/vendor/eac_cli/lib/eac_cli/definition.rb +49 -22
- data/vendor/eac_cli/lib/eac_cli/definition/alternative.rb +83 -0
- data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +17 -1
- data/vendor/eac_cli/lib/eac_cli/{parser/options_collection.rb → definition/help_formatter.rb} +20 -49
- data/vendor/eac_cli/lib/eac_cli/definition/positional_argument.rb +21 -4
- data/vendor/eac_cli/lib/eac_cli/docopt/doc_builder.rb +18 -40
- data/vendor/eac_cli/lib/eac_cli/docopt/doc_builder/alternative.rb +50 -0
- data/vendor/eac_cli/lib/eac_cli/docopt/runner_extension.rb +1 -0
- data/vendor/eac_cli/lib/eac_cli/parser.rb +21 -3
- data/vendor/eac_cli/lib/eac_cli/parser/alternative.rb +88 -0
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/argv.rb +17 -0
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/double_dash.rb +24 -0
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/options.rb +58 -0
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/positionals.rb +30 -0
- data/vendor/eac_cli/lib/eac_cli/parser/collector.rb +4 -0
- data/vendor/eac_cli/lib/eac_cli/patches/object/runner_with.rb +2 -1
- data/vendor/eac_cli/lib/eac_cli/runner.rb +7 -3
- data/vendor/eac_cli/lib/eac_cli/runner/context.rb +19 -2
- data/vendor/eac_cli/lib/eac_cli/runner_with/help.rb +1 -1
- data/vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb +5 -1
- data/vendor/eac_cli/lib/eac_cli/runner_with/subcommands.rb +96 -0
- data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
- data/vendor/eac_cli/spec/lib/eac_cli/definition/alternative_spec.rb +14 -0
- data/vendor/eac_cli/spec/lib/eac_cli/docopt/runner_extension_spec.rb +35 -0
- data/vendor/eac_cli/spec/lib/eac_cli/parser/alternative_spec.rb +140 -0
- data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +57 -40
- data/vendor/eac_cli/spec/lib/eac_cli/runner_with/output_file_spec.rb +53 -0
- data/vendor/eac_cli/spec/lib/eac_cli/runner_with/subcommands_spec.rb +57 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/abstract_methods.rb +60 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/blank_not_blank.rb +19 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/configs/base.rb +43 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/configs/file.rb +12 -31
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb +7 -104
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs/entry_reader.rb +81 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs/password_entry_reader.rb +18 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs/read_entry_options.rb +46 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs/store_passwords_entry_reader.rb +27 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/clearable_directory.rb +57 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator.rb +4 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb +9 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/stopped.rb +14 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/abstract_methods.rb +10 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/debug.rb +17 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/paths_hash.rb +21 -58
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/paths_hash/entry_key_error.rb +8 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/paths_hash/node.rb +67 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/paths_hash/path_search.rb +39 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/ruby/command.rb +2 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/struct.rb +4 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/yaml.rb +3 -2
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/abstract_methods_spec.rb +28 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/blank_not_blank_spec.rb +16 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/configs_spec.rb +15 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerator/current_spec.rb +26 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerator/stopped_spec.rb +32 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/paths_hash_spec.rb +52 -13
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/version.rb +1 -1
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/container.rb +30 -2
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/convert_job.rb +91 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/stream.rb +51 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/web_utils.rb +9 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/web_utils/instance.rb +32 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/web_utils/videos.rb +11 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/web_utils/videos/file.rb +40 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/web_utils/videos/files_list.rb +76 -0
- metadata +78 -7
- data/vendor/eac_cli/lib/eac_cli/parser/parse_result.rb +0 -21
- data/vendor/eac_cli/lib/eac_cli/parser/positional_collection.rb +0 -49
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/container/file.rb +0 -31
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/container/info.rb +0 -21
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8563bd63534580d6d7a099be6db131d899c4cd430ca5693f18578116d5c36b79
|
|
4
|
+
data.tar.gz: f7ec380ad444fc03ba43c906c09154294f0d685dda9a713fe77da78de3b4ded9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc550a52d559e31d2ce7455543b0c9024c133bcab23af4a78df484141a54c70f6e76b97b339f7257e9a879ae0043e6b97f063bd0d36a28afa501cc96a27f53a6
|
|
7
|
+
data.tar.gz: 4e24dc4ea1d43c39cba77906c2c61f1bc1a946f0bc550f9a4516269d2d0498b68cf4342d4fb230094920c4f6d8e3c1c604e2c1d47d12087e8f98d27e101cb473
|
data/lib/ehbrs/runner.rb
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'eac_cli/
|
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
|
5
|
-
require 'eac_ruby_utils/console/docopt_runner'
|
|
3
|
+
require 'eac_cli/core_ext'
|
|
6
4
|
require 'ehbrs/tools/version'
|
|
7
5
|
|
|
8
6
|
module Ehbrs
|
|
9
|
-
class Runner
|
|
7
|
+
class Runner
|
|
10
8
|
require_sub __FILE__
|
|
11
|
-
include ::EacCli::DefaultRunner
|
|
12
9
|
|
|
13
|
-
|
|
10
|
+
runner_with :help, :subcommands do
|
|
14
11
|
desc 'Tools for EHB/RS.'
|
|
15
12
|
subcommands
|
|
16
13
|
alt do
|
|
@@ -19,7 +16,7 @@ module Ehbrs
|
|
|
19
16
|
end
|
|
20
17
|
|
|
21
18
|
def run
|
|
22
|
-
if
|
|
19
|
+
if parsed[:version].present?
|
|
23
20
|
out(::Ehbrs::Tools::VERSION + "\n")
|
|
24
21
|
else
|
|
25
22
|
run_with_subcommand
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'eac_cli/
|
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
|
5
|
-
require 'eac_ruby_utils/console/docopt_runner'
|
|
3
|
+
require 'eac_cli/core_ext'
|
|
6
4
|
|
|
7
5
|
module Ehbrs
|
|
8
|
-
class Runner
|
|
9
|
-
class Finances
|
|
10
|
-
include ::EacCli::DefaultRunner
|
|
6
|
+
class Runner
|
|
7
|
+
class Finances
|
|
11
8
|
require_sub __FILE__
|
|
12
9
|
|
|
13
|
-
|
|
10
|
+
runner_with :help, :subcommands do
|
|
14
11
|
desc 'Utilidades financeiras.'
|
|
15
12
|
subcommands
|
|
16
13
|
end
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'eac_cli/
|
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
|
5
|
-
require 'eac_ruby_utils/console/docopt_runner'
|
|
3
|
+
require 'eac_cli/core_ext'
|
|
6
4
|
require 'ehbrs/videos/extract/package'
|
|
7
5
|
require 'eac_docker/images/named'
|
|
8
6
|
|
|
9
7
|
module Ehbrs
|
|
10
|
-
class Runner
|
|
11
|
-
class Finances
|
|
12
|
-
class BbBrowser
|
|
13
|
-
|
|
14
|
-
require_sub __FILE__
|
|
15
|
-
|
|
16
|
-
runner_definition do
|
|
8
|
+
class Runner
|
|
9
|
+
class Finances
|
|
10
|
+
class BbBrowser
|
|
11
|
+
runner_with :help do
|
|
17
12
|
desc 'Bankline para Banco do Brasil com módulo de segurança.'
|
|
18
13
|
end
|
|
19
14
|
|
data/lib/ehbrs/runner/fs.rb
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'eac_cli/
|
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
|
5
|
-
require 'eac_ruby_utils/console/docopt_runner'
|
|
3
|
+
require 'eac_cli/core_ext'
|
|
6
4
|
|
|
7
5
|
module Ehbrs
|
|
8
|
-
class Runner
|
|
9
|
-
class Fs
|
|
10
|
-
include ::EacCli::DefaultRunner
|
|
6
|
+
class Runner
|
|
7
|
+
class Fs
|
|
11
8
|
require_sub __FILE__
|
|
12
9
|
|
|
13
|
-
|
|
10
|
+
runner_with :help, :subcommands do
|
|
14
11
|
desc 'Ferramentas para o sistema de arquivos.'
|
|
15
12
|
subcommands
|
|
16
13
|
end
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'eac_cli/core_ext'
|
|
3
4
|
require 'ehbrs/self/observers/used_space'
|
|
4
5
|
require 'filesize'
|
|
5
6
|
|
|
6
7
|
module Ehbrs
|
|
7
|
-
class Runner
|
|
8
|
-
class Fs
|
|
8
|
+
class Runner
|
|
9
|
+
class Fs
|
|
9
10
|
class UsedSpace
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
runner_definition do
|
|
11
|
+
runner_with :help do
|
|
13
12
|
desc 'Verifica e anota alterações de espaço usado de um objeto de sistema de arquivos.'
|
|
14
13
|
bool_opt '-c', '--check', 'Anota o espaço em disco.'
|
|
15
14
|
bool_opt '-v', '--verbose', 'Verbose.'
|
data/lib/ehbrs/runner/google.rb
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'eac_cli/
|
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
|
5
|
-
require 'eac_ruby_utils/console/docopt_runner'
|
|
3
|
+
require 'eac_cli/core_ext'
|
|
6
4
|
|
|
7
5
|
module Ehbrs
|
|
8
|
-
class Runner
|
|
9
|
-
class Google
|
|
6
|
+
class Runner
|
|
7
|
+
class Google
|
|
10
8
|
require_sub __FILE__
|
|
11
|
-
include ::EacCli::DefaultRunner
|
|
12
9
|
|
|
13
|
-
|
|
10
|
+
runner_with :help, :subcommands do
|
|
14
11
|
desc 'Utilidades Google.'
|
|
15
12
|
subcommands
|
|
16
13
|
end
|
|
@@ -2,16 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
require 'eac_cli/default_runner'
|
|
4
4
|
require 'eac_ruby_utils/core_ext'
|
|
5
|
-
require 'eac_ruby_utils/console/docopt_runner'
|
|
6
5
|
require 'ehbrs/google/translate/session'
|
|
7
6
|
|
|
8
7
|
module Ehbrs
|
|
9
|
-
class Runner
|
|
10
|
-
class Google
|
|
11
|
-
class Translate
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
runner_definition do
|
|
8
|
+
class Runner
|
|
9
|
+
class Google
|
|
10
|
+
class Translate
|
|
11
|
+
runner_with :help do
|
|
15
12
|
desc 'Traduz um documento com Google Translate.'
|
|
16
13
|
arg_opt '-o', '--output-file', 'Salva saída em <output-file>.'
|
|
17
14
|
bool_opt '-w', '--overwrite', 'Permite sobreescrever arquivo de saída.'
|
|
@@ -38,12 +35,10 @@ module Ehbrs
|
|
|
38
35
|
session.translate(source_file)
|
|
39
36
|
end
|
|
40
37
|
|
|
41
|
-
|
|
42
|
-
options.fetch('<source-file>')
|
|
43
|
-
end
|
|
38
|
+
delegate :source_file, to: :parsed
|
|
44
39
|
|
|
45
40
|
def output_file
|
|
46
|
-
|
|
41
|
+
parsed.output_file || default_output_file
|
|
47
42
|
end
|
|
48
43
|
|
|
49
44
|
def default_output_file
|
|
@@ -72,7 +67,7 @@ module Ehbrs
|
|
|
72
67
|
def validate_output_file
|
|
73
68
|
return if output_to_stdout?
|
|
74
69
|
return unless ::File.exist?(output_file)
|
|
75
|
-
return if
|
|
70
|
+
return if parsed.overwrite?
|
|
76
71
|
|
|
77
72
|
fatal_error "Output file \"#{output_file}\" already exists"
|
|
78
73
|
end
|
data/lib/ehbrs/runner/self.rb
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'eac_cli/
|
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
|
5
|
-
require 'eac_ruby_utils/console/docopt_runner'
|
|
3
|
+
require 'eac_cli/core_ext'
|
|
6
4
|
|
|
7
5
|
module Ehbrs
|
|
8
|
-
class Runner
|
|
9
|
-
class Self
|
|
6
|
+
class Runner
|
|
7
|
+
class Self
|
|
10
8
|
require_sub __FILE__
|
|
11
|
-
include ::EacCli::DefaultRunner
|
|
12
9
|
|
|
13
|
-
|
|
10
|
+
runner_with :help, :subcommands do
|
|
14
11
|
desc 'Self utilities'
|
|
15
12
|
subcommands
|
|
16
13
|
end
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'eac_cli/
|
|
3
|
+
require 'eac_cli/core_ext'
|
|
4
4
|
require 'ehbrs/gems'
|
|
5
5
|
require 'eac_ruby_gems_utils/tests/multiple'
|
|
6
|
-
require 'eac_ruby_utils/core_ext'
|
|
7
|
-
require 'eac_ruby_utils/console/docopt_runner'
|
|
8
6
|
|
|
9
7
|
module Ehbrs
|
|
10
|
-
class Runner
|
|
11
|
-
class Self
|
|
12
|
-
class Test
|
|
13
|
-
|
|
14
|
-
include ::EacCli::DefaultRunner
|
|
15
|
-
|
|
16
|
-
runner_definition do
|
|
8
|
+
class Runner
|
|
9
|
+
class Self
|
|
10
|
+
class Test
|
|
11
|
+
runner_with :help do
|
|
17
12
|
desc 'Test core and local gems.'
|
|
18
13
|
end
|
|
19
14
|
|
data/lib/ehbrs/runner/vg.rb
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'eac_cli/
|
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
|
5
|
-
require 'eac_ruby_utils/console/docopt_runner'
|
|
3
|
+
require 'eac_cli/core_ext'
|
|
6
4
|
|
|
7
5
|
module Ehbrs
|
|
8
|
-
class Runner
|
|
9
|
-
class Vg
|
|
10
|
-
include ::EacCli::DefaultRunner
|
|
6
|
+
class Runner
|
|
7
|
+
class Vg
|
|
11
8
|
require_sub __FILE__
|
|
12
9
|
|
|
13
|
-
|
|
10
|
+
runner_with :help, :subcommands do
|
|
14
11
|
desc 'Ferramentas para video game.'
|
|
15
12
|
subcommands
|
|
16
13
|
end
|
data/lib/ehbrs/runner/vg/ips.rb
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'eac_cli/
|
|
4
|
-
require 'eac_cli/default_runner'
|
|
5
|
-
require 'eac_ruby_utils/core_ext'
|
|
6
|
-
require 'eac_ruby_utils/console/docopt_runner'
|
|
3
|
+
require 'eac_cli/core_ext'
|
|
7
4
|
require 'eac_ruby_utils/fs/temp'
|
|
8
5
|
require 'ehbrs/executables'
|
|
9
6
|
|
|
10
7
|
module Ehbrs
|
|
11
|
-
class Runner
|
|
12
|
-
class Vg
|
|
13
|
-
class Ips
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
runner_definition do
|
|
8
|
+
class Runner
|
|
9
|
+
class Vg
|
|
10
|
+
class Ips
|
|
11
|
+
runner_with :help do
|
|
17
12
|
desc 'Aplica patches IPS em roms.'
|
|
18
13
|
arg_opt '-o', '--output-file', ' Saída no arquivo <output-file>.'
|
|
19
14
|
bool_opt '-w', '--overwrite', 'Sobrescreve o arquivo de saída se existente.'
|
|
@@ -54,7 +49,7 @@ module Ehbrs
|
|
|
54
49
|
end
|
|
55
50
|
|
|
56
51
|
def source_file
|
|
57
|
-
|
|
52
|
+
parsed.source_file.to_pathname
|
|
58
53
|
end
|
|
59
54
|
|
|
60
55
|
def start_banner
|
|
@@ -65,11 +60,11 @@ module Ehbrs
|
|
|
65
60
|
end
|
|
66
61
|
|
|
67
62
|
def ips_files
|
|
68
|
-
|
|
63
|
+
parsed.ips_files.map(&:to_pathname)
|
|
69
64
|
end
|
|
70
65
|
|
|
71
66
|
def output_file
|
|
72
|
-
|
|
67
|
+
parsed.output_file.to_pathname || default_output_file
|
|
73
68
|
end
|
|
74
69
|
|
|
75
70
|
def default_output_file
|
|
@@ -98,7 +93,7 @@ module Ehbrs
|
|
|
98
93
|
|
|
99
94
|
def validate_output_file
|
|
100
95
|
return unless output_file.exist?
|
|
101
|
-
return if
|
|
96
|
+
return if parsed.overwrite?
|
|
102
97
|
|
|
103
98
|
fatal_error("Arquivo de saída \"#{output_file}\" já existe")
|
|
104
99
|
end
|
data/lib/ehbrs/runner/vg/wii.rb
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'eac_cli/
|
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
|
5
|
-
require 'eac_ruby_utils/console/docopt_runner'
|
|
3
|
+
require 'eac_cli/core_ext'
|
|
6
4
|
require 'eac_ruby_utils/fs/traversable'
|
|
7
5
|
require 'ehbrs/vg/wii/file_move'
|
|
8
6
|
require 'ehbrs/vg/wii/game_file'
|
|
9
7
|
|
|
10
8
|
module Ehbrs
|
|
11
|
-
class Runner
|
|
12
|
-
class Vg
|
|
13
|
-
class Wii
|
|
14
|
-
include ::EacCli::DefaultRunner
|
|
9
|
+
class Runner
|
|
10
|
+
class Vg
|
|
11
|
+
class Wii
|
|
15
12
|
include ::EacRubyUtils::Fs::Traversable
|
|
16
13
|
|
|
17
|
-
|
|
14
|
+
runner_with :help do
|
|
18
15
|
desc 'Manipulação de imagens de jogo Wii.'
|
|
19
16
|
bool_opt '-R', '--recursive', 'Busca arquivos recursivamente.'
|
|
20
17
|
bool_opt '-d', '--dump', 'Mostra todos os atributos do jogo.'
|
|
@@ -25,7 +22,7 @@ module Ehbrs
|
|
|
25
22
|
|
|
26
23
|
def run
|
|
27
24
|
infov 'Recursive?', traverser_new.recursive?
|
|
28
|
-
|
|
25
|
+
parsed.paths.each do |path|
|
|
29
26
|
traverser_check_path(path)
|
|
30
27
|
end
|
|
31
28
|
end
|
|
@@ -33,11 +30,11 @@ module Ehbrs
|
|
|
33
30
|
private
|
|
34
31
|
|
|
35
32
|
def confirm?
|
|
36
|
-
|
|
33
|
+
parsed.confirm?
|
|
37
34
|
end
|
|
38
35
|
|
|
39
36
|
def dump(game)
|
|
40
|
-
return unless
|
|
37
|
+
return unless parsed.dump?
|
|
41
38
|
|
|
42
39
|
game.properties.each do |name, value|
|
|
43
40
|
infov " * #{name}", value
|
|
@@ -54,11 +51,11 @@ module Ehbrs
|
|
|
54
51
|
end
|
|
55
52
|
|
|
56
53
|
def move_arg
|
|
57
|
-
|
|
54
|
+
parsed.move
|
|
58
55
|
end
|
|
59
56
|
|
|
60
57
|
def traverser_recursive
|
|
61
|
-
|
|
58
|
+
parsed.recursive
|
|
62
59
|
end
|
|
63
60
|
|
|
64
61
|
def traverser_check_file(path)
|
data/lib/ehbrs/runner/videos.rb
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'eac_cli/core_ext'
|
|
4
|
-
require 'eac_ruby_utils/console/docopt_runner'
|
|
5
4
|
|
|
6
5
|
module Ehbrs
|
|
7
|
-
class Runner
|
|
8
|
-
class Videos
|
|
9
|
-
runner_with :output_file
|
|
6
|
+
class Runner
|
|
7
|
+
class Videos
|
|
10
8
|
require_sub __FILE__
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
runner_with :help, :subcommands do
|
|
13
11
|
desc 'Video tools for EHB/RS.'
|
|
14
12
|
subcommands
|
|
15
13
|
end
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'eac_cli/
|
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
|
5
|
-
require 'eac_ruby_utils/console/docopt_runner'
|
|
3
|
+
require 'eac_cli/core_ext'
|
|
6
4
|
require 'ehbrs/videos/extract/package'
|
|
7
5
|
|
|
8
6
|
module Ehbrs
|
|
9
|
-
class Runner
|
|
10
|
-
class Videos
|
|
11
|
-
class Extract
|
|
12
|
-
include ::EacCli::DefaultRunner
|
|
7
|
+
class Runner
|
|
8
|
+
class Videos
|
|
9
|
+
class Extract
|
|
13
10
|
require_sub __FILE__
|
|
14
11
|
|
|
15
12
|
DEFAULT_QUALITIES = %w[1080 720 web webrip hdtv].freeze
|
|
16
13
|
|
|
17
|
-
|
|
14
|
+
runner_with :help do
|
|
18
15
|
desc 'Extrai arquivos de seriados.'
|
|
19
16
|
arg_opt '-d', '--dir', 'Extraí para diretório.'
|
|
20
17
|
bool_opt '-D', '--delete', 'Remove o pacote após o processamento.'
|
|
@@ -26,20 +23,20 @@ module Ehbrs
|
|
|
26
23
|
start_banner
|
|
27
24
|
packages.each do |package|
|
|
28
25
|
infov 'Package', package
|
|
29
|
-
package.run(
|
|
26
|
+
package.run(parsed.delete?)
|
|
30
27
|
end
|
|
31
28
|
end
|
|
32
29
|
|
|
33
30
|
private
|
|
34
31
|
|
|
35
32
|
def packages_uncached
|
|
36
|
-
|
|
33
|
+
parsed.packages?.map do |p|
|
|
37
34
|
::Ehbrs::Videos::Extract::Package.new(p, target_dir, qualities)
|
|
38
35
|
end
|
|
39
36
|
end
|
|
40
37
|
|
|
41
38
|
def qualities_uncached
|
|
42
|
-
(
|
|
39
|
+
(parsed.qualities.to_s.split(',') + DEFAULT_QUALITIES).uniq
|
|
43
40
|
end
|
|
44
41
|
|
|
45
42
|
def start_banner
|
|
@@ -49,11 +46,11 @@ module Ehbrs
|
|
|
49
46
|
end
|
|
50
47
|
|
|
51
48
|
def target_dir_uncached
|
|
52
|
-
|
|
49
|
+
parsed.dir.if_present(&:to_pathname) || default_target_dir
|
|
53
50
|
end
|
|
54
51
|
|
|
55
52
|
def default_target_dir
|
|
56
|
-
r =
|
|
53
|
+
r = parsed.packages.first.to_pathname.basename('.*')
|
|
57
54
|
return r unless r.exist?
|
|
58
55
|
|
|
59
56
|
r = r.basename_sub { |b| "#{b}_extract" }
|