ehbrs-tools 0.35.0 → 0.36.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +139 -149
  3. data/lib/ehbrs/telegram/message_sending.rb +1 -2
  4. data/lib/ehbrs/tools/core_ext.rb +0 -1
  5. data/lib/ehbrs/tools/runner/cooking_book/build.rb +2 -2
  6. data/lib/ehbrs/tools/runner/cooking_book.rb +2 -2
  7. data/lib/ehbrs/tools/runner/vg/wii.rb +4 -4
  8. data/lib/ehbrs/tools/runner/web_utils/videos/download.rb +0 -4
  9. data/lib/ehbrs/tools/runner/web_utils/videos/upload.rb +6 -11
  10. data/lib/ehbrs/tools/version.rb +1 -1
  11. metadata +29 -80
  12. data/lib/ehbrs/cooking_book/build/base_page.rb +0 -42
  13. data/lib/ehbrs/cooking_book/build/index_page.rb +0 -26
  14. data/lib/ehbrs/cooking_book/build/recipe_page.rb +0 -26
  15. data/lib/ehbrs/cooking_book/build.rb +0 -45
  16. data/lib/ehbrs/cooking_book/project.rb +0 -31
  17. data/lib/ehbrs/cooking_book/recipe/ingredient.rb +0 -21
  18. data/lib/ehbrs/cooking_book/recipe/measure.rb +0 -60
  19. data/lib/ehbrs/cooking_book/recipe/part.rb +0 -32
  20. data/lib/ehbrs/cooking_book/recipe.rb +0 -37
  21. data/lib/ehbrs/cooking_book.rb +0 -9
  22. data/lib/ehbrs/patches/object/template.rb +0 -7
  23. data/lib/ehbrs/patches.rb +0 -4
  24. data/lib/ehbrs/vg/wii/file_move.rb +0 -89
  25. data/lib/ehbrs/vg/wii/game_file.rb +0 -87
  26. data/lib/ehbrs/vg/wii/wit/image_format.rb +0 -46
  27. data/lib/ehbrs/vg/wii/wit/parsers/dump.rb +0 -67
  28. data/lib/ehbrs/vg/wii/wit/parsers/info.rb +0 -39
  29. data/lib/ehbrs/vg/wii/wit/path.rb +0 -55
  30. data/lib/ehbrs/vg/wii/wit.rb +0 -13
  31. data/lib/ehbrs/vg/wii.rb +0 -11
  32. data/lib/ehbrs/vg.rb +0 -9
  33. data/spec/lib/ehbrs/cooking_book/recipe/measure_spec.rb +0 -21
  34. data/spec/lib/ehbrs/vg/wii/game_file_spec.rb +0 -21
  35. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec.rb +0 -11
  36. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_R92P01_wia.source.witdump +0 -27
  37. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_R92P01_wia.target.yaml +0 -22
  38. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_pal_iso.source.witdump +0 -28
  39. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_pal_iso.target.yaml +0 -21
  40. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.source.witdump +0 -16
  41. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.target.yaml +0 -19
  42. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/super_mario_galaxy_wbfs.source.witdump +0 -28
  43. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/super_mario_galaxy_wbfs.target.yaml +0 -23
  44. data/spec/lib/ehbrs/vg/wii/wit/path_spec.rb +0 -33
@@ -1,87 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
- require 'eac_ruby_utils/custom_format'
5
- require 'ehbrs/vg/wii/wit/parsers/dump'
6
- require 'ehbrs/vg/wii/wit/path'
7
- require 'pathname'
8
-
9
- module Ehbrs
10
- module Vg
11
- module Wii
12
- class GameFile < ::Pathname
13
- enable_simple_cache
14
-
15
- DISC_NUMBER_PATTERN = /disc.?(\d)/i.freeze
16
-
17
- FORMAT = ::EacRubyUtils::CustomFormat.new(
18
- b: :basename,
19
- d: :dirname,
20
- D: :disc_number,
21
- e: :extname,
22
- i: :id6,
23
- m: :normalized_disc_name,
24
- n: :disc_name,
25
- N: :nintendont_basename,
26
- s: :sanitized_disc_name,
27
- t: :database_title,
28
- T: :disc_type
29
- )
30
-
31
- def database_title
32
- properties.fetch('DB title')
33
- end
34
-
35
- def disc_name
36
- properties.fetch('Disc name')
37
- end
38
-
39
- def disc_number
40
- DISC_NUMBER_PATTERN.if_match(basename.to_s, false) { |m| m[1].to_i }.if_present(1)
41
- end
42
-
43
- def disc_type
44
- properties.fetch('File & disc type/type')
45
- end
46
-
47
- def format(string)
48
- FORMAT.format(string).with(self)
49
- end
50
-
51
- def normalized_disc_name
52
- sanitized_disc_name.downcase
53
- end
54
-
55
- def nintendont_basename
56
- n = disc_number
57
- n == 1 ? 'game' : "disc#{n}"
58
- end
59
-
60
- def id6
61
- properties.fetch('Disc & part IDs/disc')
62
- end
63
-
64
- def sanitized_disc_name
65
- ::ActiveSupport::Inflector.transliterate(disc_name).gsub(/[^0-9a-z ]/i, '')
66
- end
67
-
68
- def valid?
69
- properties.present?
70
- end
71
-
72
- def wit_path
73
- ::Ehbrs::Vg::Wii::Wit::Path.new(disc_type, self)
74
- end
75
-
76
- private
77
-
78
- def properties_uncached
79
- r = ::Ehbrs::Executables.wit.command.append(['dump', to_s]).execute
80
- return nil unless r.fetch(:exit_code).zero?
81
-
82
- ::Ehbrs::Vg::Wii::Wit::Parsers::Dump.new(r.fetch(:stdout)).properties
83
- end
84
- end
85
- end
86
- end
87
- end
@@ -1,46 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
- require 'ehbrs/executables'
5
- require 'ehbrs/vg/wii/wit/parsers/info'
6
-
7
- module Ehbrs
8
- module Vg
9
- module Wii
10
- module Wit
11
- class ImageFormat
12
- class << self
13
- SECTION_NAME_PATTERN = /\A#{::Regexp.quote('IMAGE-FORMAT:')}(.+)\z/.freeze
14
-
15
- enable_simple_cache
16
-
17
- def by_name(name)
18
- all.find { |i| i.name.downcase == name.to_s.downcase } ||
19
- raise(::ArgumentError, "Image not found with name \"#{name.to_s.downcase}\"" \
20
- " (Available: #{all.map(&:name).join(', ')})")
21
- end
22
-
23
- private
24
-
25
- def all_uncached
26
- ::Ehbrs::Vg::Wii::Wit::Parsers::Info.new(info_output).images.map do |_label, data|
27
- new(
28
- *%w[name info option].map { |k| data.fetch(k) },
29
- *%w[extensions attributes].map { |k| data.fetch(k).to_s.split(/\s+/) }
30
- )
31
- end
32
- end
33
-
34
- def info_output
35
- ::Ehbrs::Executables.wit.command
36
- .append(%w[info image-format --sections])
37
- .execute!
38
- end
39
- end
40
-
41
- common_constructor :name, :description, :option, :extensions, :attributes
42
- end
43
- end
44
- end
45
- end
46
- end
@@ -1,67 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Ehbrs
6
- module Vg
7
- module Wii
8
- module Wit
9
- module Parsers
10
- class Dump
11
- enable_simple_cache
12
- common_constructor :output
13
-
14
- # WIA/WII (v1.00,LZMA2.7@100) & Wii
15
- # ISO/WII & Wii
16
- # WBFS/WII & Wii
17
- # ISO/GC & GameCube
18
- FILE_DISC_TYPE_PATTERN = %r{\A(\S+)/(\S+)\s+(?:\(([^\)]+)\)\s+)?&\s+(\S+)\z}.freeze
19
-
20
- private
21
-
22
- def properties_uncached
23
- r = {}
24
- output.each_line do |line|
25
- dump_output_line_to_hash(line).if_present { |v| r.merge!(v) }
26
- end
27
- r
28
- end
29
-
30
- def dump_output_line_to_hash(line)
31
- m = /\A\s*([^:]+):\s+(.+)\z/.match(line.strip)
32
- return nil unless m
33
-
34
- parse_attribute(m[1].strip, m[2].strip)
35
- end
36
-
37
- def line_method_parser(label)
38
- "parse_#{label}".parameterize.underscore
39
- end
40
-
41
- def parse_attribute(label, value)
42
- method = line_method_parser(label)
43
- return { label => value } unless respond_to?(method, true)
44
-
45
- send(method, value).map { |k, v| ["#{label}/#{k}", v] }.to_h
46
- end
47
-
48
- def parse_file_disc_type(value)
49
- r = FILE_DISC_TYPE_PATTERN.match(value).if_present do |m|
50
- { type: m[1], platform_acronym: m[2], type_extra: m[3],
51
- platform_name: m[4] }
52
- end
53
- r.if_blank { raise "\"#{FILE_DISC_TYPE_PATTERN}\" does not match \"#{value}\"" }
54
- end
55
-
56
- def parse_disc_part_ids(value)
57
- value.split(',').map(&:strip).map do |v|
58
- r = v.split('=')
59
- [r[0].strip, r[1].strip]
60
- end.to_h
61
- end
62
- end
63
- end
64
- end
65
- end
66
- end
67
- end
@@ -1,39 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
- require 'ehbrs/executables'
5
- require 'fileutils'
6
- require 'inifile'
7
-
8
- module Ehbrs
9
- module Vg
10
- module Wii
11
- module Wit
12
- module Parsers
13
- class Info
14
- SECTION_NAME_PATTERN = /\A#{::Regexp.quote('IMAGE-FORMAT:')}(.+)\z/.freeze
15
-
16
- enable_simple_cache
17
- common_constructor :output
18
-
19
- private
20
-
21
- def images_uncached
22
- ini = ::IniFile.new(content: output)
23
- r = {}
24
- ini.sections.each do |section_name|
25
- image_section_name = parse_image_section_name(section_name)
26
- r[image_section_name] = ini[section_name] if image_section_name.present?
27
- end
28
- r
29
- end
30
-
31
- def parse_image_section_name(section_name)
32
- SECTION_NAME_PATTERN.match(section_name).if_present { |m| m[1] }
33
- end
34
- end
35
- end
36
- end
37
- end
38
- end
39
- end
@@ -1,55 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Ehbrs
6
- module Vg
7
- module Wii
8
- module Wit
9
- class Path
10
- WIT_PATH_PATTERN = /\A(?:([a-z0-9]+):)?(.+)\z/i.freeze
11
-
12
- class << self
13
- def assert(source)
14
- source = parse(source) unless source.is_a?(self)
15
- source
16
- end
17
-
18
- def parse(path)
19
- WIT_PATH_PATTERN
20
- .match(path)
21
- .if_present { |m| new(m[1], m[2]) }
22
- .if_blank { raise "\"#{WIT_PATH_PATTERN}\" does not match \"#{path}\"" }
23
- end
24
- end
25
-
26
- common_constructor :type, :path do
27
- self.type = type.to_s.upcase
28
- self.path = ::Pathname.new(path.to_s)
29
- end
30
-
31
- def change?(other)
32
- type_change?(other) || path_change?(other)
33
- end
34
-
35
- def path_change?(other)
36
- path.expand_path.to_s != other.path.expand_path.to_s
37
- end
38
-
39
- def to_s
40
- r = path.to_s
41
- r = "#{type.to_s.upcase}:#{r}" if type.present?
42
- r
43
- end
44
-
45
- def type_change?(other)
46
- return false if other.type.blank?
47
- return true if type.blank?
48
-
49
- type != other.type
50
- end
51
- end
52
- end
53
- end
54
- end
55
- end
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Ehbrs
6
- module Vg
7
- module Wii
8
- module Wit
9
- require_sub __FILE__
10
- end
11
- end
12
- end
13
- end
data/lib/ehbrs/vg/wii.rb DELETED
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Ehbrs
6
- module Vg
7
- module Wii
8
- require_sub __FILE__
9
- end
10
- end
11
- end
data/lib/ehbrs/vg.rb DELETED
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Ehbrs
6
- module Vg
7
- require_sub __FILE__
8
- end
9
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'ehbrs/cooking_book/recipe/measure'
4
-
5
- RSpec.describe ::Ehbrs::CookingBook::Recipe::Measure do
6
- describe '#build'
7
- {
8
- '1.5 cup' => [1.5, nil, 'cup'],
9
- '~' => [nil, nil, nil],
10
- '2/ 3 u' => [2, 3, 'u'],
11
- '4.5/7.8' => [4.5, 7.8, nil]
12
- }.each do |source, expected|
13
- context "when source is \"#{source}\"" do
14
- let(:instance) { described_class.build(source) }
15
-
16
- it { expect(instance.numerator).to eq(expected[0]) }
17
- it { expect(instance.denominator).to eq(expected[1]) }
18
- it { expect(instance.unit).to eq(expected[2]) }
19
- end
20
- end
21
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'ehbrs/vg/wii/game_file'
4
-
5
- RSpec.describe ::Ehbrs::Vg::Wii::GameFile do
6
- [['game.iso', 1, 'game'], ['disc1.iso', 1, 'game'], ['disc2.iso', 2, 'disc2'],
7
- ['Resident Evil - Code - Veronica X (USA) (Disc 1)', 1, 'game'],
8
- ['Resident Evil - Code - Veronica X (USA) (Disc 2)', 2, 'disc2']].each do |s|
9
- context "when game file is #{s[0]}" do
10
- let(:game_file) { described_class.new(s[0]) }
11
-
12
- it "disc_number should be #{s[1]}" do
13
- expect(game_file.disc_number).to eq(s[1])
14
- end
15
-
16
- it "nintendont_basename should be #{s[2]}" do
17
- expect(game_file.nintendont_basename).to eq(s[2])
18
- end
19
- end
20
- end
21
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'ehbrs/vg/wii/wit/parsers/dump'
4
-
5
- RSpec.describe ::Ehbrs::Vg::Wii::Wit::Parsers::Dump do
6
- include_examples 'source_target_fixtures', __FILE__
7
-
8
- def source_data(source_file)
9
- described_class.new(::File.read(source_file)).properties
10
- end
11
- end
@@ -1,27 +0,0 @@
1
-
2
- Dump of file /home/eduardo/storage/roms/wii/games_untested/Pikmin 2 - New Play Control_ [R92P01].wia
3
-
4
- Real path: /mnt/storage/eduardo/roms/wii/games_untested/Pikmin 2 - New Play Control_ [R92P01].wia
5
- Virtual size: 118240000/hex = 4699979776 = 4482 MiB
6
- Scrubbed size: 7af30000/hex = 2062745600 = 1967 MiB, 43.9%, 62950*32K
7
- WIA file size: 63d2da4e/hex = 1674762830 = 1597 MiB, 35.6%, 81.2%
8
- File & disc type: WIA/WII (v1.00,LZMA2.7@100) & Wii
9
- Disc & part IDs: disc=R92P01, ticket=R92P, tmd=R92P, boot=R92P01
10
- Disc name: PIKMIN2 for Wii
11
- DB title: Pikmin 2
12
- ID Region: PAL [PAL ]
13
- Region setting: 2 [Europe] / Jap=128 USA=128 ?=128 Eur=0,3,3,4,3,7 Kor=128
14
- System version: 00000001-00000021 = IOS 0x21 = IOS 33
15
- Partitions: 1 [encrypted, well signed]
16
- Directories: 593
17
- Files: 2376
18
-
19
- 1 partition table with 1 partition:
20
-
21
- index type offset .. end off size/hex = size/dec = MiB status
22
- ----------------------------------------------------------------------------------------
23
- 0 part.tab 40020 .. 40028 8 = 8 1 partition
24
- ----------------------------------------------------------------------------------------
25
- 0.0 DATA 0 f800000 .. 1173c0000 107bc0000 = 4424728576 = 4220 enc,signed
26
- ----------------------------------------------------------------------------------------
27
-
@@ -1,22 +0,0 @@
1
- ---
2
- Real path: "/mnt/storage/eduardo/roms/wii/games_untested/Pikmin 2 - New Play Control_
3
- [R92P01].wia"
4
- Virtual size: 118240000/hex = 4699979776 = 4482 MiB
5
- Scrubbed size: 7af30000/hex = 2062745600 = 1967 MiB, 43.9%, 62950*32K
6
- WIA file size: 63d2da4e/hex = 1674762830 = 1597 MiB, 35.6%, 81.2%
7
- File & disc type/type: WIA
8
- File & disc type/platform_acronym: WII
9
- File & disc type/type_extra: v1.00,LZMA2.7@100
10
- File & disc type/platform_name: Wii
11
- Disc & part IDs/disc: R92P01
12
- Disc & part IDs/ticket: R92P
13
- Disc & part IDs/tmd: R92P
14
- Disc & part IDs/boot: R92P01
15
- Disc name: PIKMIN2 for Wii
16
- DB title: Pikmin 2
17
- ID Region: PAL [PAL ]
18
- Region setting: 2 [Europe] / Jap=128 USA=128 ?=128 Eur=0,3,3,4,3,7 Kor=128
19
- System version: 00000001-00000021 = IOS 0x21 = IOS 33
20
- Partitions: 1 [encrypted, well signed]
21
- Directories: '593'
22
- Files: '2376'
@@ -1,28 +0,0 @@
1
-
2
- Dump of file pikmin2_pal.iso
3
-
4
- Real path: /mnt/storage/eduardo/roms/wii/games_untested/pikmin2_pal.iso
5
- ISO file size: 118240000/hex = 4699979776 = 4482 MiB
6
- Scrubbed size: 85790000/hex = 2239299584 = 2136 MiB, 47.6%, 68338*32K
7
- File & disc type: ISO/WII & Wii
8
- Disc & part IDs: disc=R92P01, ticket=R92P, tmd=R92P, boot=R92P01
9
- Disc name: PIKMIN2 for Wii
10
- DB title: Pikmin 2
11
- ID Region: PAL [PAL ]
12
- Region setting: 2 [Europe] / Jap=128 USA=128 ?=128 Eur=0,3,3,4,3,7 Kor=128
13
- System menu: v386 = 3.4E
14
- System version: 00000001-00000021 = IOS 0x21 = IOS 33
15
- Partitions: 2 [encrypted, well signed]
16
- Directories: 598
17
- Files: 2421
18
-
19
- 1 partition table with 2 partitions:
20
-
21
- index type offset .. end off size/hex = size/dec = MiB status
22
- ----------------------------------------------------------------------------------------
23
- 0 part.tab 40020 .. 40030 10 = 16 2 partitions
24
- ----------------------------------------------------------------------------------------
25
- 0.0 UPDATE 1 50000 .. a8b8000 a868000 = 176586752 = 168 enc,signed
26
- 0.1 DATA 0 f800000 .. 1173c0000 107bc0000 = 4424728576 = 4220 enc,signed
27
- ----------------------------------------------------------------------------------------
28
-
@@ -1,21 +0,0 @@
1
- ---
2
- Real path: "/mnt/storage/eduardo/roms/wii/games_untested/pikmin2_pal.iso"
3
- ISO file size: 118240000/hex = 4699979776 = 4482 MiB
4
- Scrubbed size: 85790000/hex = 2239299584 = 2136 MiB, 47.6%, 68338*32K
5
- File & disc type/type: ISO
6
- File & disc type/platform_acronym: WII
7
- File & disc type/type_extra:
8
- File & disc type/platform_name: Wii
9
- Disc & part IDs/disc: R92P01
10
- Disc & part IDs/ticket: R92P
11
- Disc & part IDs/tmd: R92P
12
- Disc & part IDs/boot: R92P01
13
- Disc name: PIKMIN2 for Wii
14
- DB title: Pikmin 2
15
- ID Region: PAL [PAL ]
16
- Region setting: 2 [Europe] / Jap=128 USA=128 ?=128 Eur=0,3,3,4,3,7 Kor=128
17
- System menu: v386 = 3.4E
18
- System version: 00000001-00000021 = IOS 0x21 = IOS 33
19
- Partitions: 2 [encrypted, well signed]
20
- Directories: '598'
21
- Files: '2421'
@@ -1,16 +0,0 @@
1
-
2
- Dump of file /home/eduardo/storage/roms/gc/RESIDENT EVIL CVX [GCDE08]/disc2.iso
3
-
4
- Real path: /mnt/storage/eduardo/roms/wii/disk/games/RESIDENT EVIL CVX [GCDE08]/disc2.iso
5
- ISO file size: 57058000/hex = 1459978240 = 1392 MiB
6
- Scrubbed size: 4fcf8000/hex = 1338998784 = 1277 MiB, 91.7%, 40863*32K
7
- File & disc type: ISO/GC & GameCube
8
- Disc & part IDs: disc=GCDE08, ticket=...., tmd=-, boot=GCDE08
9
- Disc name: RESIDENT EVIL CVX
10
- DB title: Resident Evil Code: Veronica X
11
- ID Region: NTSC/USA [USA ]
12
- BI2 Region: 1 [USA]
13
- Partitions: 1 []
14
- Directories: 4
15
- Files: 54
16
-
@@ -1,19 +0,0 @@
1
- ---
2
- Real path: "/mnt/storage/eduardo/roms/wii/disk/games/RESIDENT EVIL CVX [GCDE08]/disc2.iso"
3
- ISO file size: 57058000/hex = 1459978240 = 1392 MiB
4
- Scrubbed size: 4fcf8000/hex = 1338998784 = 1277 MiB, 91.7%, 40863*32K
5
- File & disc type/type: ISO
6
- File & disc type/platform_acronym: GC
7
- File & disc type/type_extra:
8
- File & disc type/platform_name: GameCube
9
- Disc & part IDs/disc: GCDE08
10
- Disc & part IDs/ticket: "...."
11
- Disc & part IDs/tmd: "-"
12
- Disc & part IDs/boot: GCDE08
13
- Disc name: RESIDENT EVIL CVX
14
- DB title: 'Resident Evil Code: Veronica X'
15
- ID Region: NTSC/USA [USA ]
16
- BI2 Region: 1 [USA]
17
- Partitions: 1 []
18
- Directories: '4'
19
- Files: '54'
@@ -1,28 +0,0 @@
1
-
2
- Dump of file /home/eduardo/storage/roms/wii/disk/wbfs/SUPER MARIO GALAXY [RMGE01]/RMGE01.wbfs/#0
3
-
4
- Real path: /mnt/storage/eduardo/roms/wii/disk/wbfs/SUPER MARIO GALAXY [RMGE01]/RMGE01.wbfs/#0
5
- Virtual size: 118240000/hex = 4699979776 = 4482 MiB
6
- Scrubbed size: d0b28000/hex = 3501359104 = 3339 MiB, 74.5%, 106853*32K
7
- WBFS file size: d1200000/hex = 3508535296 = 3346 MiB, 74.7%, 100.2%
8
- WBFS fragments: 1+0 = a ratio of 0.00 additional_fragments/GiB
9
- File & disc type: WBFS/WII & Wii
10
- Disc & part IDs: disc=RMGE01, ticket=RMGE, tmd=RMGE, boot=RMGE01, wbfs=RMGE01
11
- Disc name: SUPER MARIO GALAXY
12
- DB title: Super Mario Galaxy
13
- ID Region: NTSC/USA [USA ]
14
- Region setting: 1 [USA] / Jap=128 USA=6 ?=128 Eur=128,128,128,128,128,128 Kor=128
15
- System version: 00000001-00000021 = IOS 0x21 = IOS 33
16
- Partitions: 1 [encrypted, scrubbed, well signed]
17
- Directories: 79
18
- Files: 2383
19
-
20
- 1 partition table with 1 partition:
21
-
22
- index type offset .. end off size/hex = size/dec = MiB status
23
- ----------------------------------------------------------------------------------------
24
- 0 part.tab 40020 .. 40028 8 = 8 1 partition
25
- ----------------------------------------------------------------------------------------
26
- 0.0 DATA 0 f800000 .. 1173c0000 107bc0000 = 4424728576 = 4220 enc,signed,scrub
27
- ----------------------------------------------------------------------------------------
28
-
@@ -1,23 +0,0 @@
1
- ---
2
- Real path: "/mnt/storage/eduardo/roms/wii/disk/wbfs/SUPER MARIO GALAXY [RMGE01]/RMGE01.wbfs/#0"
3
- Virtual size: 118240000/hex = 4699979776 = 4482 MiB
4
- Scrubbed size: d0b28000/hex = 3501359104 = 3339 MiB, 74.5%, 106853*32K
5
- WBFS file size: d1200000/hex = 3508535296 = 3346 MiB, 74.7%, 100.2%
6
- WBFS fragments: 1+0 = a ratio of 0.00 additional_fragments/GiB
7
- File & disc type/type: WBFS
8
- File & disc type/platform_acronym: WII
9
- File & disc type/type_extra:
10
- File & disc type/platform_name: Wii
11
- Disc & part IDs/disc: RMGE01
12
- Disc & part IDs/ticket: RMGE
13
- Disc & part IDs/tmd: RMGE
14
- Disc & part IDs/boot: RMGE01
15
- Disc & part IDs/wbfs: RMGE01
16
- Disc name: SUPER MARIO GALAXY
17
- DB title: Super Mario Galaxy
18
- ID Region: NTSC/USA [USA ]
19
- Region setting: 1 [USA] / Jap=128 USA=6 ?=128 Eur=128,128,128,128,128,128 Kor=128
20
- System version: 00000001-00000021 = IOS 0x21 = IOS 33
21
- Partitions: 1 [encrypted, scrubbed, well signed]
22
- Directories: '79'
23
- Files: '2383'
@@ -1,33 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'ehbrs/vg/wii/wit/path'
4
-
5
- RSpec.describe ::Ehbrs::Vg::Wii::Wit::Path do
6
- describe '#parse' do
7
- context 'when type is present' do
8
- let(:source) { 'WbFs:path/to/file.wbfs' }
9
- let(:instance) { described_class.parse(source) }
10
-
11
- it { expect(instance.type).to eq('WBFS') }
12
- it { expect(instance.path.to_s).to eq('path/to/file.wbfs') }
13
- end
14
-
15
- context 'when type is blank' do
16
- let(:source) { 'path/to/file.wbfs' }
17
- let(:instance) { described_class.parse(source) }
18
-
19
- it { expect(instance.type).to eq('') }
20
- it { expect(instance.path.to_s).to eq('path/to/file.wbfs') }
21
- end
22
- end
23
-
24
- describe '#change?' do
25
- let(:with_type) { described_class.new('ISO', 'path/to/file.wbfs') }
26
- let(:without_type) { described_class.new(nil, 'path/to/file.wbfs') }
27
-
28
- it { expect(with_type.change?(without_type)).to eq(false) }
29
- it { expect(without_type.change?(with_type)).to eq(true) }
30
-
31
- context 'when'
32
- end
33
- end