PyLibMS 3.1.3__tar.gz → 3.1.5__tar.gz

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.

Potentially problematic release.


This version of PyLibMS might be problematic. Click here for more details.

Files changed (70) hide show
  1. {pylibms-3.1.3 → pylibms-3.1.5}/PKG-INFO +3 -2
  2. {pylibms-3.1.3 → pylibms-3.1.5}/PyLibMS.egg-info/PKG-INFO +3 -2
  3. {pylibms-3.1.3 → pylibms-3.1.5}/README.md +2 -1
  4. {pylibms-3.1.3 → pylibms-3.1.5}/lms/common/lms_fileinfo.py +1 -2
  5. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/definitions/field/lms_field.py +2 -15
  6. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/definitions/lms_messagetext.py +6 -2
  7. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/msbt.py +2 -0
  8. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/msbtio.py +6 -4
  9. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/section/atr1.py +5 -2
  10. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/tag/io/param_io.py +4 -2
  11. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/tag/io/tag_io.py +6 -4
  12. {pylibms-3.1.3 → pylibms-3.1.5}/lms/project/msbp.py +3 -3
  13. {pylibms-3.1.3 → pylibms-3.1.5}/lms/titleconfig/config.py +2 -2
  14. {pylibms-3.1.3 → pylibms-3.1.5}/pyproject.toml +1 -1
  15. {pylibms-3.1.3 → pylibms-3.1.5}/LICENSE +0 -0
  16. {pylibms-3.1.3 → pylibms-3.1.5}/MANIFEST.in +0 -0
  17. {pylibms-3.1.3 → pylibms-3.1.5}/PyLibMS.egg-info/SOURCES.txt +0 -0
  18. {pylibms-3.1.3 → pylibms-3.1.5}/PyLibMS.egg-info/dependency_links.txt +0 -0
  19. {pylibms-3.1.3 → pylibms-3.1.5}/PyLibMS.egg-info/requires.txt +0 -0
  20. {pylibms-3.1.3 → pylibms-3.1.5}/PyLibMS.egg-info/top_level.txt +0 -0
  21. {pylibms-3.1.3 → pylibms-3.1.5}/lms/__init__.py +0 -0
  22. {pylibms-3.1.3 → pylibms-3.1.5}/lms/common/__init__.py +0 -0
  23. {pylibms-3.1.3 → pylibms-3.1.5}/lms/common/lms_datatype.py +0 -0
  24. {pylibms-3.1.3 → pylibms-3.1.5}/lms/common/lms_exceptions.py +0 -0
  25. {pylibms-3.1.3 → pylibms-3.1.5}/lms/common/stream/fileinfo.py +0 -0
  26. {pylibms-3.1.3 → pylibms-3.1.5}/lms/common/stream/hashtable.py +0 -0
  27. {pylibms-3.1.3 → pylibms-3.1.5}/lms/common/stream/section.py +0 -0
  28. {pylibms-3.1.3 → pylibms-3.1.5}/lms/fileio/encoding.py +0 -0
  29. {pylibms-3.1.3 → pylibms-3.1.5}/lms/fileio/io.py +0 -0
  30. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/__init__.py +0 -0
  31. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/definitions/__init__.py +0 -0
  32. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/definitions/field/__init__.py +0 -0
  33. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/definitions/field/io.py +0 -0
  34. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/msbtentry.py +0 -0
  35. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/section/__init__.py +0 -0
  36. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/section/tsy1.py +0 -0
  37. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/section/txt2.py +0 -0
  38. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/tag/__init__.py +0 -0
  39. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/tag/lms_tag.py +0 -0
  40. {pylibms-3.1.3 → pylibms-3.1.5}/lms/message/tag/lms_tagexceptions.py +0 -0
  41. {pylibms-3.1.3 → pylibms-3.1.5}/lms/project/__init__.py +0 -0
  42. {pylibms-3.1.3 → pylibms-3.1.5}/lms/project/definitions/__init__.py +0 -0
  43. {pylibms-3.1.3 → pylibms-3.1.5}/lms/project/definitions/attribute.py +0 -0
  44. {pylibms-3.1.3 → pylibms-3.1.5}/lms/project/definitions/color.py +0 -0
  45. {pylibms-3.1.3 → pylibms-3.1.5}/lms/project/definitions/style.py +0 -0
  46. {pylibms-3.1.3 → pylibms-3.1.5}/lms/project/definitions/tag.py +0 -0
  47. {pylibms-3.1.3 → pylibms-3.1.5}/lms/project/msbpread.py +0 -0
  48. {pylibms-3.1.3 → pylibms-3.1.5}/lms/project/section/ali2.py +0 -0
  49. {pylibms-3.1.3 → pylibms-3.1.5}/lms/project/section/ati2.py +0 -0
  50. {pylibms-3.1.3 → pylibms-3.1.5}/lms/project/section/clr1.py +0 -0
  51. {pylibms-3.1.3 → pylibms-3.1.5}/lms/project/section/string.py +0 -0
  52. {pylibms-3.1.3 → pylibms-3.1.5}/lms/project/section/syl3.py +0 -0
  53. {pylibms-3.1.3 → pylibms-3.1.5}/lms/project/section/tag2.py +0 -0
  54. {pylibms-3.1.3 → pylibms-3.1.5}/lms/project/section/tgg2.py +0 -0
  55. {pylibms-3.1.3 → pylibms-3.1.5}/lms/project/section/tgp2.py +0 -0
  56. {pylibms-3.1.3 → pylibms-3.1.5}/lms/titleconfig/__init__.py +0 -0
  57. {pylibms-3.1.3 → pylibms-3.1.5}/lms/titleconfig/definitions/__init__.py +0 -0
  58. {pylibms-3.1.3 → pylibms-3.1.5}/lms/titleconfig/definitions/attribute.py +0 -0
  59. {pylibms-3.1.3 → pylibms-3.1.5}/lms/titleconfig/definitions/tags.py +0 -0
  60. {pylibms-3.1.3 → pylibms-3.1.5}/lms/titleconfig/definitions/value.py +0 -0
  61. {pylibms-3.1.3 → pylibms-3.1.5}/lms/titleconfig/presets/Badge Arcade.yaml +0 -0
  62. {pylibms-3.1.3 → pylibms-3.1.5}/lms/titleconfig/presets/Brain Age Concentration Training.yaml +0 -0
  63. {pylibms-3.1.3 → pylibms-3.1.5}/lms/titleconfig/presets/Kirby Planet Robobot.yaml +0 -0
  64. {pylibms-3.1.3 → pylibms-3.1.5}/lms/titleconfig/presets/Super Mario 3D Land.yaml +0 -0
  65. {pylibms-3.1.3 → pylibms-3.1.5}/lms/titleconfig/presets/Super Mario 3D World + Bowsers Fury.yaml +0 -0
  66. {pylibms-3.1.3 → pylibms-3.1.5}/lms/titleconfig/presets/Super Mario Odyssey.yaml +0 -0
  67. {pylibms-3.1.3 → pylibms-3.1.5}/lms/titleconfig/presets/The Legend of Zelda Echos of Wisdom.yaml +0 -0
  68. {pylibms-3.1.3 → pylibms-3.1.5}/lms/titleconfig/presets/The Legend of Zelda a Link Between Worlds.yaml +0 -0
  69. {pylibms-3.1.3 → pylibms-3.1.5}/lms/titleconfig/presets/Tomodachi Life.yaml +0 -0
  70. {pylibms-3.1.3 → pylibms-3.1.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyLibMS
3
- Version: 3.1.3
3
+ Version: 3.1.5
4
4
  Summary: Python library built for the libMessageStudio (LMS) proprietary file formats from Nintendo. Supports MSBT, MSBP, and MSBF.
5
5
  Author: AbdyyEee
6
6
  License: Copyright 2025 AbdyyEee
@@ -24,7 +24,8 @@ PylibMS is a library built in Python 3.10+ for the libMessageStudio (LMS) propri
24
24
 
25
25
  * Full reading and writing of MSBT files.
26
26
  * Full reading of MSBP files.
27
- * Supports encoded/decoded attributes and encoding/decoded tags.
27
+ * Supports encoded/decoded attributes
28
+ * Supporting encoded/decoded tags 1:1 with Nintendos offical tool and BB code Syntax.
28
29
  * Additonal tag manipulation.
29
30
 
30
31
  This library is designed to support LMS revision 3.0 and above, with the associated file formats used across the following Nintendo platforms:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyLibMS
3
- Version: 3.1.3
3
+ Version: 3.1.5
4
4
  Summary: Python library built for the libMessageStudio (LMS) proprietary file formats from Nintendo. Supports MSBT, MSBP, and MSBF.
5
5
  Author: AbdyyEee
6
6
  License: Copyright 2025 AbdyyEee
@@ -24,7 +24,8 @@ PylibMS is a library built in Python 3.10+ for the libMessageStudio (LMS) propri
24
24
 
25
25
  * Full reading and writing of MSBT files.
26
26
  * Full reading of MSBP files.
27
- * Supports encoded/decoded attributes and encoding/decoded tags.
27
+ * Supports encoded/decoded attributes
28
+ * Supporting encoded/decoded tags 1:1 with Nintendos offical tool and BB code Syntax.
28
29
  * Additonal tag manipulation.
29
30
 
30
31
  This library is designed to support LMS revision 3.0 and above, with the associated file formats used across the following Nintendo platforms:
@@ -3,7 +3,8 @@ PylibMS is a library built in Python 3.10+ for the libMessageStudio (LMS) propri
3
3
 
4
4
  * Full reading and writing of MSBT files.
5
5
  * Full reading of MSBP files.
6
- * Supports encoded/decoded attributes and encoding/decoded tags.
6
+ * Supports encoded/decoded attributes
7
+ * Supporting encoded/decoded tags 1:1 with Nintendos offical tool and BB code Syntax.
7
8
  * Additonal tag manipulation.
8
9
 
9
10
  This library is designed to support LMS revision 3.0 and above, with the associated file formats used across the following Nintendo platforms:
@@ -1,9 +1,8 @@
1
- from dataclasses import dataclass, field
1
+ from dataclasses import dataclass
2
2
 
3
3
  from lms.fileio.encoding import FileEncoding
4
4
 
5
5
 
6
- @dataclass(frozen=True)
7
6
  class LMS_FileInfo:
8
7
  is_big_endian: bool = False
9
8
  encoding: FileEncoding = FileEncoding.UTF16
@@ -25,27 +25,14 @@ class LMS_FieldMap:
25
25
  def __iter__(self) -> Iterator[LMS_Field]:
26
26
  return iter(self._fields.values())
27
27
 
28
- def get_field(self, name: str) -> LMS_Field:
29
- """
30
- Returns the field associated with the name.
31
-
32
- :param name: the name of the field.
33
- """
28
+ def __getitem__(self, name: str) -> LMS_Field:
34
29
  if name not in self._fields:
35
30
  raise KeyError(f"Field '{name}' does not exist")
36
-
37
31
  return self._fields[name]
38
32
 
39
- def set_value(self, name: str, value: FieldValue) -> None:
40
- """
41
- Sets the value of the specified field.
42
-
43
- :param name: the name of the field.
44
- :param value: the new value for the field.
45
- """
33
+ def __setitem__(self, name: str, value: FieldValue) -> None:
46
34
  if name not in self._fields:
47
35
  raise KeyError(f"Field '{name}' does not exist")
48
-
49
36
  self._fields[name].value = value
50
37
 
51
38
  def to_dict(self) -> dict[str, FieldValue]:
@@ -1,8 +1,12 @@
1
1
  import re
2
2
 
3
3
  from lms.message.definitions.field.lms_field import LMS_FieldMap
4
- from lms.message.tag.lms_tag import (LMS_ControlTag, LMS_DecodedTag,
5
- LMS_EncodedTag, is_tag)
4
+ from lms.message.tag.lms_tag import (
5
+ LMS_ControlTag,
6
+ LMS_DecodedTag,
7
+ LMS_EncodedTag,
8
+ is_tag,
9
+ )
6
10
  from lms.titleconfig.config import TagConfig
7
11
 
8
12
 
@@ -117,9 +117,11 @@ class MSBT:
117
117
  # Insert the section magics in the correct position that when writing the sections will be properly recognized
118
118
  if attribute is not None and "ATR1" not in self.section_list:
119
119
  self.section_list.insert(2, "ATR1")
120
+ self._info.section_count += 1
120
121
 
121
122
  if style_index is not None and "TSY1" not in self.section_list:
122
123
  self.section_list.insert(3, "TSY1")
124
+ self._info.section_count += 1
123
125
 
124
126
  self._entries.append(
125
127
  MSBTEntry(
@@ -2,13 +2,15 @@ from typing import BinaryIO
2
2
 
3
3
  from lms.common.stream.fileinfo import read_file_info, write_file_info
4
4
  from lms.common.stream.hashtable import read_labels, write_labels
5
- from lms.common.stream.section import (read_section_data, write_section,
6
- write_unsupported_section)
5
+ from lms.common.stream.section import (
6
+ read_section_data,
7
+ write_section,
8
+ write_unsupported_section,
9
+ )
7
10
  from lms.fileio.io import FileReader, FileWriter
8
11
  from lms.message.msbt import MSBT
9
12
  from lms.message.msbtentry import MSBTEntry
10
- from lms.message.section.atr1 import (read_atr1, write_decoded_atr1,
11
- write_encoded_atr1)
13
+ from lms.message.section.atr1 import read_atr1, write_decoded_atr1, write_encoded_atr1
12
14
  from lms.message.section.tsy1 import read_tsy1, write_tsy1
13
15
  from lms.message.section.txt2 import read_txt2, write_txt2
14
16
  from lms.titleconfig.config import AttributeConfig, TagConfig
@@ -1,8 +1,11 @@
1
1
  from lms.common.lms_datatype import LMS_DataType
2
2
  from lms.fileio.io import FileReader, FileWriter
3
3
  from lms.message.definitions.field.io import read_field, write_field
4
- from lms.message.definitions.field.lms_field import (LMS_DataType, LMS_Field,
5
- LMS_FieldMap)
4
+ from lms.message.definitions.field.lms_field import (
5
+ LMS_DataType,
6
+ LMS_Field,
7
+ LMS_FieldMap,
8
+ )
6
9
  from lms.titleconfig.definitions.attribute import AttributeConfig
7
10
 
8
11
 
@@ -4,8 +4,10 @@ from lms.common.lms_datatype import LMS_DataType
4
4
  from lms.fileio.io import FileReader, FileWriter
5
5
  from lms.message.definitions.field.io import read_field, write_field
6
6
  from lms.message.definitions.field.lms_field import LMS_Field, LMS_FieldMap
7
- from lms.message.tag.lms_tagexceptions import (LMS_TagReadingError,
8
- LMS_TagWritingException)
7
+ from lms.message.tag.lms_tagexceptions import (
8
+ LMS_TagReadingError,
9
+ LMS_TagWritingException,
10
+ )
9
11
  from lms.titleconfig.definitions.tags import TagDefinition
10
12
 
11
13
  TAG_PADDING_BYTE = b"\xcd"
@@ -1,9 +1,11 @@
1
1
  from lms.fileio.encoding import FileEncoding
2
2
  from lms.fileio.io import FileReader, FileWriter
3
- from lms.message.tag.io.param_io import (read_decoded_parameters,
4
- read_encoded_parameters,
5
- write_decoded_parameters,
6
- write_encoded_parameters)
3
+ from lms.message.tag.io.param_io import (
4
+ read_decoded_parameters,
5
+ read_encoded_parameters,
6
+ write_decoded_parameters,
7
+ write_encoded_parameters,
8
+ )
7
9
  from lms.message.tag.lms_tag import LMS_DecodedTag, LMS_EncodedTag
8
10
  from lms.message.tag.lms_tagexceptions import LMS_TagReadingError
9
11
  from lms.titleconfig.definitions.tags import TagConfig, TagDefinition
@@ -24,7 +24,7 @@ class MSBP:
24
24
  self._info = info
25
25
 
26
26
  self._colors = colors
27
- self._config = config
27
+ self._attribute_definitions = config
28
28
  self._tag_groups = tag_groups
29
29
  self._styles = styles
30
30
  self._source_files = source_files
@@ -40,9 +40,9 @@ class MSBP:
40
40
  return self._colors
41
41
 
42
42
  @property
43
- def attribute_info(self) -> list[LMS_AttributeDefinition] | None:
43
+ def attribute_definitions(self) -> list[LMS_AttributeDefinition] | None:
44
44
  """The attribute definitions for the project instance."""
45
- return self._config
45
+ return self._attribute_definitions
46
46
 
47
47
  @property
48
48
  def tag_groups(self) -> list[LMS_TagGroup] | None:
@@ -172,10 +172,10 @@ class TitleConfig:
172
172
  config[TitleConfig.TAG_KEY]["tags"].append(definition)
173
173
 
174
174
  config[TitleConfig.ATTR_KEY] = []
175
- if project.attribute_info is not None:
175
+ if project.attribute_definitions is not None:
176
176
 
177
177
  attr_definitions = []
178
- for attr_def in project.attribute_info:
178
+ for attr_def in project.attribute_definitions:
179
179
  definition = {
180
180
  "name": attr_def.name,
181
181
  "description": "",
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "PyLibMS"
7
- version = "3.1.3"
7
+ version = "3.1.5"
8
8
  requires-python = ">=3.12"
9
9
  description = "Python library built for the libMessageStudio (LMS) proprietary file formats from Nintendo. Supports MSBT, MSBP, and MSBF."
10
10
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes