ehbrs-tools 0.13.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ehbrs/executables.rb +1 -1
- data/lib/ehbrs/runner.rb +10 -17
- 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 +8 -9
- 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 +7 -14
- data/lib/ehbrs/runner/videos/extract.rb +10 -13
- data/lib/ehbrs/runner/videos/probe.rb +32 -0
- 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/videos/file.rb +2 -1
- data/lib/ehbrs/videos/series/rename/file/options.rb +3 -13
- data/lib/ehbrs/videos/unsupported/fix_profile.rb +1 -0
- data/vendor/eac_cli/eac_cli.gemspec +3 -3
- data/vendor/eac_cli/lib/eac_cli/core_ext.rb +4 -0
- data/vendor/eac_cli/lib/eac_cli/default_runner.rb +6 -14
- data/vendor/eac_cli/lib/eac_cli/definition.rb +94 -0
- data/vendor/eac_cli/lib/eac_cli/definition/argument_option.rb +13 -0
- data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +42 -0
- data/vendor/eac_cli/lib/eac_cli/definition/boolean_option.rb +13 -0
- data/vendor/eac_cli/lib/eac_cli/definition/positional_argument.rb +31 -0
- data/vendor/eac_cli/lib/eac_cli/{runner/docopt_doc.rb → docopt/doc_builder.rb} +15 -8
- data/vendor/eac_cli/lib/eac_cli/docopt/runner_extension.rb +46 -0
- data/vendor/eac_cli/lib/eac_cli/parser.rb +14 -0
- data/vendor/eac_cli/lib/eac_cli/parser/collector.rb +60 -0
- data/vendor/eac_cli/lib/eac_cli/parser/error.rb +15 -0
- data/vendor/eac_cli/lib/eac_cli/parser/options_collection.rb +127 -0
- data/vendor/eac_cli/lib/eac_cli/parser/parse_result.rb +38 -0
- data/vendor/eac_cli/lib/eac_cli/parser/positional_collection.rb +77 -0
- data/vendor/eac_cli/lib/eac_cli/patches.rb +4 -0
- data/vendor/eac_cli/lib/eac_cli/patches/object.rb +5 -0
- data/vendor/eac_cli/lib/eac_cli/patches/object/runner_with.rb +25 -0
- data/vendor/eac_cli/lib/eac_cli/runner.rb +68 -7
- data/vendor/eac_cli/lib/eac_cli/runner/context.rb +35 -0
- data/vendor/eac_cli/lib/eac_cli/runner_with.rb +9 -0
- data/vendor/eac_cli/lib/eac_cli/runner_with/help.rb +19 -0
- data/vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb +26 -0
- 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/docopt/runner_extension_spec.rb +25 -0
- data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +78 -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/blank_not_blank.rb +19 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/boolean.rb +31 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_concern.rb +4 -4
- 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 +8 -40
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs/read_entry_options.rb +41 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner.rb +6 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_class_methods.rb +2 -2
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_subcommands.rb +8 -2
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env.rb +12 -9
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/dasho_options.rb +53 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/identity_file.rb +25 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/quiet.rb +24 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/terminal.rb +34 -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/immutable/array_accessor.rb +4 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/immutable/hash_accessor.rb +4 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb +18 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/listable/list.rb +5 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/listable/value.rb +3 -2
- 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/object/if_respond.rb +22 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string.rb +4 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string/inflector.rb +9 -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/require_sub.rb +8 -8
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/ruby/command.rb +2 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/simple_cache.rb +6 -2
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/struct.rb +57 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- 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/inflector_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/eac_ruby_utils/spec/lib/eac_ruby_utils/struct_spec.rb +46 -0
- data/vendor/ehbrs_ruby_utils/Gemfile +16 -0
- data/vendor/ehbrs_ruby_utils/ehbrs_ruby_utils.gemspec +20 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils.rb +7 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/executables.rb +28 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/version.rb +5 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos.rb +9 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/container.rb +11 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/container/file.rb +31 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/container/info.rb +21 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/quality.rb +68 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/resolution.rb +68 -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
- data/vendor/ehbrs_ruby_utils/spec/lib/ehbrs_ruby_utils/videos/resolution_spec.rb +18 -0
- data/vendor/ehbrs_ruby_utils/spec/rubocop_check_spec.rb +7 -0
- data/vendor/ehbrs_ruby_utils/spec/spec_helper.rb +100 -0
- metadata +77 -10
- data/vendor/eac_cli/lib/eac_cli/runner/argument_option.rb +0 -13
- data/vendor/eac_cli/lib/eac_cli/runner/base_option.rb +0 -22
- data/vendor/eac_cli/lib/eac_cli/runner/boolean_option.rb +0 -13
- data/vendor/eac_cli/lib/eac_cli/runner/definition.rb +0 -64
- data/vendor/eac_cli/lib/eac_cli/runner/positional_argument.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c933ef15a718774ec5c1a1f2d4915da05a21d76df979e12a901ed036b9794877
|
4
|
+
data.tar.gz: 4b942fb2711d4a9dfc3ff5f89b1ed73167124b0f3974ab1f023ddd3e68724538
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a07de2b1b7ec7208b46b14b19e84a69e43a2c3c1d9b29b2e8cebbb253324efbff9390464a26c2d6289542bf5cc41aac08ca5cf64a26a103f5d1ae8b7c2f6d82
|
7
|
+
data.tar.gz: e456a371d70caa2e7bf9a8c34adc950f413e4673dce6f0666b7eed406cf184ae9a042d9cb7e3e7a7fd306f7eaf7ccbd6304c7e778ae925f1999e2f09e3e995e6
|
data/lib/ehbrs/executables.rb
CHANGED
data/lib/ehbrs/runner.rb
CHANGED
@@ -1,29 +1,22 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
4
|
-
require 'eac_ruby_utils/console/docopt_runner'
|
3
|
+
require 'eac_cli/core_ext'
|
5
4
|
require 'ehbrs/tools/version'
|
6
5
|
|
7
6
|
module Ehbrs
|
8
|
-
class Runner
|
7
|
+
class Runner
|
9
8
|
require_sub __FILE__
|
10
|
-
enable_console_speaker
|
11
9
|
|
12
|
-
|
13
|
-
Tools for EHB/RS.
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
Options:
|
21
|
-
-h --help Show this screen.
|
22
|
-
-V --version Show version.
|
23
|
-
DOCOPT
|
10
|
+
runner_with :help, :subcommands do
|
11
|
+
desc 'Tools for EHB/RS.'
|
12
|
+
subcommands
|
13
|
+
alt do
|
14
|
+
bool_opt '-V', '--version', 'Show version.'
|
15
|
+
end
|
16
|
+
end
|
24
17
|
|
25
18
|
def run
|
26
|
-
if
|
19
|
+
if parsed[:version].present?
|
27
20
|
out(::Ehbrs::Tools::VERSION + "\n")
|
28
21
|
else
|
29
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
|
9
|
-
class UsedSpace
|
10
|
-
|
11
|
-
|
12
|
-
runner_definition do
|
8
|
+
class Runner
|
9
|
+
class Fs
|
10
|
+
class UsedSpace
|
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.'
|
@@ -22,7 +21,7 @@ module Ehbrs
|
|
22
21
|
end
|
23
22
|
|
24
23
|
def check?
|
25
|
-
|
24
|
+
parsed.check
|
26
25
|
end
|
27
26
|
|
28
27
|
private
|
@@ -40,11 +39,11 @@ module Ehbrs
|
|
40
39
|
end
|
41
40
|
|
42
41
|
def paths_uncached
|
43
|
-
|
42
|
+
parsed.paths.map { |path| path_class.new(self, path) }
|
44
43
|
end
|
45
44
|
|
46
45
|
def verbose?
|
47
|
-
|
46
|
+
parsed.verbose
|
48
47
|
end
|
49
48
|
|
50
49
|
class PathBase
|
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,23 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
4
|
-
require 'eac_ruby_utils/console/docopt_runner'
|
3
|
+
require 'eac_cli/core_ext'
|
5
4
|
|
6
5
|
module Ehbrs
|
7
|
-
class Runner
|
8
|
-
class Videos
|
6
|
+
class Runner
|
7
|
+
class Videos
|
9
8
|
require_sub __FILE__
|
10
9
|
|
11
|
-
|
12
|
-
Video tools for EHB/RS.
|
13
|
-
|
14
|
-
|
15
|
-
__PROGRAM__ [options] __SUBCOMMANDS__
|
16
|
-
__PROGRAM__ -h | --help
|
17
|
-
|
18
|
-
Options:
|
19
|
-
-h --help Show this screen.
|
20
|
-
DOCOPT
|
10
|
+
runner_with :help, :subcommands do
|
11
|
+
desc 'Video tools for EHB/RS.'
|
12
|
+
subcommands
|
13
|
+
end
|
21
14
|
end
|
22
15
|
end
|
23
16
|
end
|