ehbrs-tools 0.43.1 → 0.44.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.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +170 -151
  3. data/exe/ehbrs +1 -1
  4. data/lib/ehbrs/tools/application.rb +7 -5
  5. data/lib/ehbrs/tools/core_ext.rb +0 -2
  6. data/lib/ehbrs/tools/executables.rb +0 -16
  7. data/lib/ehbrs/tools/google/translate/session.rb +61 -0
  8. data/lib/ehbrs/tools/instance.rb +0 -3
  9. data/lib/ehbrs/tools/observers/base.rb +63 -0
  10. data/lib/ehbrs/tools/observers/with_persistence.rb +33 -0
  11. data/lib/ehbrs/tools/runner/booking/accommodations.rb +0 -3
  12. data/lib/ehbrs/tools/runner/booking.rb +0 -2
  13. data/lib/ehbrs/tools/runner/cooking_book/build.rb +0 -4
  14. data/lib/ehbrs/tools/runner/cooking_book.rb +0 -3
  15. data/lib/ehbrs/tools/runner/finances/bb_browser.rb +0 -3
  16. data/lib/ehbrs/tools/runner/finances.rb +0 -2
  17. data/lib/ehbrs/tools/runner/fs/selected.rb +0 -5
  18. data/lib/ehbrs/tools/runner/fs/used_space.rb +1 -5
  19. data/lib/ehbrs/tools/runner/fs.rb +0 -2
  20. data/lib/ehbrs/tools/runner/google/translate.rb +1 -5
  21. data/lib/ehbrs/tools/runner/google.rb +0 -2
  22. data/lib/ehbrs/tools/runner/music/lyrics.rb +0 -4
  23. data/lib/ehbrs/tools/runner/music/lyrics_book.rb +0 -5
  24. data/lib/ehbrs/tools/runner/music/selected.rb +0 -3
  25. data/lib/ehbrs/tools/runner/music/sort/dump.rb +0 -4
  26. data/lib/ehbrs/tools/runner/music/sort/load.rb +0 -2
  27. data/lib/ehbrs/tools/runner/music/sort/shuffle.rb +0 -3
  28. data/lib/ehbrs/tools/runner/music/sort.rb +0 -3
  29. data/lib/ehbrs/tools/runner/music/spread.rb +0 -4
  30. data/lib/ehbrs/tools/runner/music.rb +0 -2
  31. data/lib/ehbrs/tools/runner/telegram/send_message.rb +1 -4
  32. data/lib/ehbrs/tools/runner/telegram.rb +0 -3
  33. data/lib/ehbrs/tools/runner/vg/patch.rb +2 -7
  34. data/lib/ehbrs/tools/runner/vg/ps2/rename.rb +0 -3
  35. data/lib/ehbrs/tools/runner/vg/ps2.rb +0 -2
  36. data/lib/ehbrs/tools/runner/vg/wii.rb +0 -5
  37. data/lib/ehbrs/tools/runner/vg.rb +0 -2
  38. data/lib/ehbrs/tools/runner/videos/extract.rb +0 -3
  39. data/lib/ehbrs/tools/runner/videos/languages/file_runner.rb +1 -4
  40. data/lib/ehbrs/tools/runner/videos/languages/labelized.rb +0 -2
  41. data/lib/ehbrs/tools/runner/videos/languages/language.rb +0 -3
  42. data/lib/ehbrs/tools/runner/videos/languages/track.rb +0 -3
  43. data/lib/ehbrs/tools/runner/videos/languages.rb +0 -5
  44. data/lib/ehbrs/tools/runner/videos/opensubtitles.rb +0 -3
  45. data/lib/ehbrs/tools/runner/videos/probe.rb +0 -4
  46. data/lib/ehbrs/tools/runner/videos/series/rename.rb +0 -5
  47. data/lib/ehbrs/tools/runner/videos/series.rb +0 -2
  48. data/lib/ehbrs/tools/runner/videos/subtitles/sanitize.rb +0 -3
  49. data/lib/ehbrs/tools/runner/videos/subtitles.rb +0 -2
  50. data/lib/ehbrs/tools/runner/videos/unsupported.rb +0 -5
  51. data/lib/ehbrs/tools/runner/videos.rb +0 -2
  52. data/lib/ehbrs/tools/runner/web_utils/finances/bills/consume.rb +0 -4
  53. data/lib/ehbrs/tools/runner/web_utils/finances/bills.rb +0 -2
  54. data/lib/ehbrs/tools/runner/web_utils/finances.rb +0 -2
  55. data/lib/ehbrs/tools/runner/web_utils/videos/download.rb +0 -3
  56. data/lib/ehbrs/tools/runner/web_utils/videos/upload.rb +0 -5
  57. data/lib/ehbrs/tools/runner/web_utils/videos.rb +0 -2
  58. data/lib/ehbrs/tools/runner/web_utils.rb +0 -3
  59. data/lib/ehbrs/tools/runner.rb +1 -7
  60. data/lib/ehbrs/tools/self/observers/used_space.rb +22 -0
  61. data/lib/ehbrs/tools/self/observers/with_persistence.rb +37 -0
  62. data/lib/ehbrs/tools/telegram/message_sending.rb +30 -0
  63. data/lib/ehbrs/tools/user_dirs.rb +33 -0
  64. data/lib/ehbrs/tools/version.rb +1 -1
  65. data/lib/ehbrs/tools.rb +7 -2
  66. metadata +47 -54
  67. data/lib/ehbrs/google/translate/session.rb +0 -61
  68. data/lib/ehbrs/google/translate.rb +0 -11
  69. data/lib/ehbrs/google.rb +0 -9
  70. data/lib/ehbrs/music.rb +0 -9
  71. data/lib/ehbrs/observers/base.rb +0 -63
  72. data/lib/ehbrs/observers/with_persistence.rb +0 -34
  73. data/lib/ehbrs/observers.rb +0 -11
  74. data/lib/ehbrs/self/observers/used_space.rb +0 -22
  75. data/lib/ehbrs/self/observers/with_persistence.rb +0 -38
  76. data/lib/ehbrs/self.rb +0 -9
  77. data/lib/ehbrs/telegram/message_sending.rb +0 -31
  78. data/lib/ehbrs/telegram.rb +0 -9
  79. data/lib/ehbrs/tools/vg/patches/applier_factory.rb +0 -43
  80. data/lib/ehbrs/tools/vg/patches/base_applier.rb +0 -37
  81. data/lib/ehbrs/tools/vg/patches/ips_applier.rb +0 -23
  82. data/lib/ehbrs/tools/vg/patches/temp_files.rb +0 -40
  83. data/lib/ehbrs/tools/vg/patches/vcdiff_applier.rb +0 -23
  84. data/lib/ehbrs/tools/vg/patches.rb +0 -13
  85. data/lib/ehbrs/tools/vg.rb +0 -11
  86. data/lib/ehbrs/user_dirs.rb +0 -34
@@ -1,37 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Ehbrs
6
- module Tools
7
- module Vg
8
- module Patches
9
- class BaseApplier
10
- acts_as_abstract
11
- common_constructor :patch_path
12
-
13
- # @param source_path [Pathname]
14
- # @param output_path [Pathname]
15
- # @raise [RuntimeError] Se o arquivo de saída não é criado.
16
- def apply(source_path, output_path)
17
- source_path = source_path.to_pathname
18
- output_path = output_path.to_pathname
19
- command(source_path, output_path).system!
20
-
21
- return if output_path.exist?
22
-
23
- fatal_error("Applier returned without error, but output file \"#{output_path}\"" \
24
- 'does not exist')
25
- end
26
-
27
- # @param source_path [Pathname]
28
- # @param output_path [Pathname]
29
- # @return [EacRubyUtils::Envs::Command]
30
- def command(source_path, output_path)
31
- raise_abstract_method __method__, source_path, output_path
32
- end
33
- end
34
- end
35
- end
36
- end
37
- end
@@ -1,23 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
- require 'ehbrs/tools/executables'
5
- require 'ehbrs/tools/vg/patches/base_applier'
6
-
7
- module Ehbrs
8
- module Tools
9
- module Vg
10
- module Patches
11
- class IpsApplier < ::Ehbrs::Tools::Vg::Patches::BaseApplier
12
- # @param source_path [Pathname]
13
- # @param output_path [Pathname]
14
- # @return [EacRubyUtils::Envs::Command]
15
- def command(source_path, output_path)
16
- ::Ehbrs::Tools::Executables.flips.command
17
- .append(['--apply', patch_path, source_path, output_path])
18
- end
19
- end
20
- end
21
- end
22
- end
23
- end
@@ -1,40 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Ehbrs
6
- module Tools
7
- module Vg
8
- module Patches
9
- class TempFiles
10
- common_constructor :initial, :temp0, :temp1
11
-
12
- def input
13
- swaped? ? temp0 : initial
14
- end
15
-
16
- def move_result_to(dest)
17
- return unless swaped?
18
-
19
- ::FileUtils.mv(temp0.to_path, dest.to_path)
20
- end
21
-
22
- def output
23
- temp1
24
- end
25
-
26
- def swap
27
- temp0_current = temp0
28
- self.temp0 = temp1
29
- self.temp1 = temp0_current
30
- @swaped = true
31
- end
32
-
33
- def swaped?
34
- @swaped ? true : false
35
- end
36
- end
37
- end
38
- end
39
- end
40
- end
@@ -1,23 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
- require 'ehbrs/tools/executables'
5
- require 'ehbrs/tools/vg/patches/base_applier'
6
-
7
- module Ehbrs
8
- module Tools
9
- module Vg
10
- module Patches
11
- class VcdiffApplier < ::Ehbrs::Tools::Vg::Patches::BaseApplier
12
- # @param source_path [Pathname]
13
- # @param output_path [Pathname]
14
- # @return [EacRubyUtils::Envs::Command]
15
- def command(source_path, output_path)
16
- ::Ehbrs::Tools::Executables.xdelta3.command
17
- .append(['-d', '-s', source_path, patch_path, output_path])
18
- end
19
- end
20
- end
21
- end
22
- end
23
- end
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Ehbrs
6
- module Tools
7
- module Vg
8
- module Patches
9
- require_sub __FILE__
10
- end
11
- end
12
- end
13
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Ehbrs
6
- module Tools
7
- module Vg
8
- require_sub __FILE__
9
- end
10
- end
11
- end
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_fs/storage_tree'
4
- require 'eac_ruby_utils/simple_cache'
5
-
6
- module Ehbrs
7
- module UserDirs
8
- class << self
9
- include ::EacRubyUtils::SimpleCache
10
-
11
- def application_id
12
- 'ehbrs-tools'
13
- end
14
-
15
- private
16
-
17
- def user_home_dir_uncached
18
- ::EacFs::StorageTree.new(Dir.home)
19
- end
20
-
21
- def cache_uncached
22
- user_home_dir.child('.cache', application_id)
23
- end
24
-
25
- def config_uncached
26
- user_home_dir.child('.config', application_id)
27
- end
28
-
29
- def data_uncached
30
- user_home_dir.child('.local', 'share', application_id)
31
- end
32
- end
33
- end
34
- end