PyREUser3 0.2.0__tar.gz → 0.3.0__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.
Files changed (45) hide show
  1. pyreuser3-0.3.0/PKG-INFO +71 -0
  2. pyreuser3-0.3.0/PyREUser3.egg-info/PKG-INFO +71 -0
  3. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/PyREUser3.egg-info/SOURCES.txt +1 -0
  4. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/README.md +27 -2
  5. pyreuser3-0.3.0/docs/PYPI.md +38 -0
  6. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/docs/README.zh-CN.md +27 -2
  7. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyproject.toml +2 -2
  8. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/api.py +55 -2
  9. pyreuser3-0.2.0/PKG-INFO +0 -165
  10. pyreuser3-0.2.0/PyREUser3.egg-info/PKG-INFO +0 -165
  11. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/LICENSE +0 -0
  12. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/MANIFEST.in +0 -0
  13. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/PyREUser3.egg-info/dependency_links.txt +0 -0
  14. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/PyREUser3.egg-info/entry_points.txt +0 -0
  15. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/PyREUser3.egg-info/requires.txt +0 -0
  16. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/PyREUser3.egg-info/top_level.txt +0 -0
  17. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/__init__.py +0 -0
  18. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/__main__.py +0 -0
  19. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/cli.py +0 -0
  20. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/core.py +0 -0
  21. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/export/__init__.py +0 -0
  22. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/export/base.py +0 -0
  23. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/export/enums.py +0 -0
  24. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/export/fields.py +0 -0
  25. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/export/metadata.py +0 -0
  26. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/export/postprocess.py +0 -0
  27. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/export/tree.py +0 -0
  28. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/export/user3.py +0 -0
  29. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/pack/__init__.py +0 -0
  30. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/pack/base.py +0 -0
  31. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/pack/models.py +0 -0
  32. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/pack/plan.py +0 -0
  33. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/pack/writer.py +0 -0
  34. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/rich_ui.py +0 -0
  35. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/schema.py +0 -0
  36. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/web/__init__.py +0 -0
  37. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/web/__main__.py +0 -0
  38. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/web/handler.py +0 -0
  39. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/web/jobs.py +0 -0
  40. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/web/page.py +0 -0
  41. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/web/picker.py +0 -0
  42. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/web/runners.py +0 -0
  43. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/web/server.py +0 -0
  44. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/pyreuser3/web/settings.py +0 -0
  45. {pyreuser3-0.2.0 → pyreuser3-0.3.0}/setup.cfg +0 -0
@@ -0,0 +1,71 @@
1
+ Metadata-Version: 2.4
2
+ Name: PyREUser3
3
+ Version: 0.3.0
4
+ Summary: Pure Python tools for converting RE Engine .user.3 files to and from JSON.
5
+ Author: Egg Targaryen
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/dzxrly/PyREUser3
8
+ Project-URL: Repository, https://github.com/dzxrly/PyREUser3
9
+ Project-URL: Issues, https://github.com/dzxrly/PyREUser3/issues
10
+ Keywords: RE Engine,user.3,JSON,modding,RSZ
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Topic :: File Formats
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Classifier: Topic :: Utilities
25
+ Requires-Python: >=3.9
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: rich>=13.0
29
+ Provides-Extra: dev
30
+ Requires-Dist: build>=1.2; extra == "dev"
31
+ Requires-Dist: twine>=5.0; extra == "dev"
32
+ Dynamic: license-file
33
+
34
+ # PyREUser3
35
+
36
+ PyREUser3 is a pure Python package for converting RE Engine `.user.3` database files to JSON and packing compatible JSON back to `.user.3`.
37
+
38
+ ## Installation
39
+
40
+ ```bash
41
+ pip install pyreuser3
42
+ ```
43
+
44
+ ## What Is Included
45
+
46
+ - `.user.3 -> JSON` export.
47
+ - `JSON -> .user.3` packing.
48
+ - A reusable Python API through `REUser3Converter`.
49
+ - CLI commands through `pyreuser3`.
50
+ - A local `.user.3` export Web UI through `pyreuser3-web`.
51
+
52
+ The published package intentionally does not include game resources, dumped game data, RE_RSZ templates, `il2cpp_dump.json`, `.msg.23` conversion tools, or repository-specific helper scripts. You need to provide data files that match the target game and version.
53
+
54
+ ## Requirements
55
+
56
+ - Python 3.9 or newer.
57
+ - A RE_RSZ schema JSON file for the target game/version.
58
+ - An `il2cpp_dump.json` file when exporting readable enum labels.
59
+ - One or more unpacked `.user.3` files.
60
+
61
+ ## Usage
62
+
63
+ Usage details may change as the package evolves. For the latest command-line and Python API examples, read the GitHub README:
64
+
65
+ https://github.com/dzxrly/PyREUser3#readme
66
+
67
+ ## Links
68
+
69
+ - Homepage: https://github.com/dzxrly/PyREUser3
70
+ - Issues: https://github.com/dzxrly/PyREUser3/issues
71
+ - License: MIT License
@@ -0,0 +1,71 @@
1
+ Metadata-Version: 2.4
2
+ Name: PyREUser3
3
+ Version: 0.3.0
4
+ Summary: Pure Python tools for converting RE Engine .user.3 files to and from JSON.
5
+ Author: Egg Targaryen
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/dzxrly/PyREUser3
8
+ Project-URL: Repository, https://github.com/dzxrly/PyREUser3
9
+ Project-URL: Issues, https://github.com/dzxrly/PyREUser3/issues
10
+ Keywords: RE Engine,user.3,JSON,modding,RSZ
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Topic :: File Formats
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Classifier: Topic :: Utilities
25
+ Requires-Python: >=3.9
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: rich>=13.0
29
+ Provides-Extra: dev
30
+ Requires-Dist: build>=1.2; extra == "dev"
31
+ Requires-Dist: twine>=5.0; extra == "dev"
32
+ Dynamic: license-file
33
+
34
+ # PyREUser3
35
+
36
+ PyREUser3 is a pure Python package for converting RE Engine `.user.3` database files to JSON and packing compatible JSON back to `.user.3`.
37
+
38
+ ## Installation
39
+
40
+ ```bash
41
+ pip install pyreuser3
42
+ ```
43
+
44
+ ## What Is Included
45
+
46
+ - `.user.3 -> JSON` export.
47
+ - `JSON -> .user.3` packing.
48
+ - A reusable Python API through `REUser3Converter`.
49
+ - CLI commands through `pyreuser3`.
50
+ - A local `.user.3` export Web UI through `pyreuser3-web`.
51
+
52
+ The published package intentionally does not include game resources, dumped game data, RE_RSZ templates, `il2cpp_dump.json`, `.msg.23` conversion tools, or repository-specific helper scripts. You need to provide data files that match the target game and version.
53
+
54
+ ## Requirements
55
+
56
+ - Python 3.9 or newer.
57
+ - A RE_RSZ schema JSON file for the target game/version.
58
+ - An `il2cpp_dump.json` file when exporting readable enum labels.
59
+ - One or more unpacked `.user.3` files.
60
+
61
+ ## Usage
62
+
63
+ Usage details may change as the package evolves. For the latest command-line and Python API examples, read the GitHub README:
64
+
65
+ https://github.com/dzxrly/PyREUser3#readme
66
+
67
+ ## Links
68
+
69
+ - Homepage: https://github.com/dzxrly/PyREUser3
70
+ - Issues: https://github.com/dzxrly/PyREUser3/issues
71
+ - License: MIT License
@@ -8,6 +8,7 @@ PyREUser3.egg-info/dependency_links.txt
8
8
  PyREUser3.egg-info/entry_points.txt
9
9
  PyREUser3.egg-info/requires.txt
10
10
  PyREUser3.egg-info/top_level.txt
11
+ docs/PYPI.md
11
12
  docs/README.zh-CN.md
12
13
  pyreuser3/__init__.py
13
14
  pyreuser3/__main__.py
@@ -1,6 +1,15 @@
1
- # PyREUser3
1
+ <h1 align="center">PyREUser3</h1>
2
2
 
3
- English | [简体中文](./docs/README.zh-CN.md)
3
+ <p align="center">
4
+ English | <a href="https://github.com/dzxrly/PyREUser3/blob/main/docs/README.zh-CN.md">简体中文</a>
5
+ </p>
6
+
7
+ <p align="center">
8
+ <a href="https://pypi.org/project/PyREUser3/"><img alt="PyPI Project" src="https://img.shields.io/badge/PyPI-PyREUser3-blue"></a>
9
+ <a href="https://pypi.org/project/PyREUser3/"><img alt="PyPI Version" src="https://img.shields.io/pypi/v/PyREUser3"></a>
10
+ <a href="https://pepy.tech/project/PyREUser3"><img alt="Downloads" src="https://static.pepy.tech/badge/PyREUser3"></a>
11
+ <a href="https://github.com/dzxrly/PyREUser3/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/pypi/l/PyREUser3"></a>
12
+ </p>
4
13
 
5
14
  PyREUser3 is a pure Python package for converting RE Engine `.user.3` database files to JSON and packing compatible JSON back to `.user.3`.
6
15
 
@@ -86,6 +95,22 @@ converter.pack_file(
86
95
  )
87
96
  ```
88
97
 
98
+ Convert a `.user.3` file to an in-memory JSON-compatible Python object without writing a JSON file:
99
+
100
+ ```python
101
+ readable_data = converter.user3_to_json(
102
+ "input/OtomonData.user.3",
103
+ json_format="readable",
104
+ )
105
+
106
+ repack_data = converter.user3_to_json(
107
+ "input/OtomonData.user.3",
108
+ json_format="repack",
109
+ )
110
+ ```
111
+
112
+ Use `json_format="readable"` for the same shape produced by `export_file()`, or `json_format="repack"` for the full instance-table document accepted by `pack()`.
113
+
89
114
  For stable patch-and-repack workflows, use `patch_file()` or `parse_pack_file()`:
90
115
 
91
116
  ```python
@@ -0,0 +1,38 @@
1
+ # PyREUser3
2
+
3
+ PyREUser3 is a pure Python package for converting RE Engine `.user.3` database files to JSON and packing compatible JSON back to `.user.3`.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install pyreuser3
9
+ ```
10
+
11
+ ## What Is Included
12
+
13
+ - `.user.3 -> JSON` export.
14
+ - `JSON -> .user.3` packing.
15
+ - A reusable Python API through `REUser3Converter`.
16
+ - CLI commands through `pyreuser3`.
17
+ - A local `.user.3` export Web UI through `pyreuser3-web`.
18
+
19
+ The published package intentionally does not include game resources, dumped game data, RE_RSZ templates, `il2cpp_dump.json`, `.msg.23` conversion tools, or repository-specific helper scripts. You need to provide data files that match the target game and version.
20
+
21
+ ## Requirements
22
+
23
+ - Python 3.9 or newer.
24
+ - A RE_RSZ schema JSON file for the target game/version.
25
+ - An `il2cpp_dump.json` file when exporting readable enum labels.
26
+ - One or more unpacked `.user.3` files.
27
+
28
+ ## Usage
29
+
30
+ Usage details may change as the package evolves. For the latest command-line and Python API examples, read the GitHub README:
31
+
32
+ https://github.com/dzxrly/PyREUser3#readme
33
+
34
+ ## Links
35
+
36
+ - Homepage: https://github.com/dzxrly/PyREUser3
37
+ - Issues: https://github.com/dzxrly/PyREUser3/issues
38
+ - License: MIT License
@@ -1,6 +1,15 @@
1
- # PyREUser3
1
+ <h1 align="center">PyREUser3</h1>
2
2
 
3
- [English](../README.md) | 简体中文
3
+ <p align="center">
4
+ <a href="https://github.com/dzxrly/PyREUser3/blob/main/README.md">English</a> | 简体中文
5
+ </p>
6
+
7
+ <p align="center">
8
+ <a href="https://pypi.org/project/PyREUser3/"><img alt="PyPI 项目" src="https://img.shields.io/badge/PyPI-PyREUser3-blue"></a>
9
+ <a href="https://pypi.org/project/PyREUser3/"><img alt="PyPI 版本" src="https://img.shields.io/pypi/v/PyREUser3"></a>
10
+ <a href="https://pepy.tech/project/PyREUser3"><img alt="下载量" src="https://static.pepy.tech/badge/PyREUser3"></a>
11
+ <a href="https://github.com/dzxrly/PyREUser3/blob/main/LICENSE"><img alt="许可证" src="https://img.shields.io/pypi/l/PyREUser3"></a>
12
+ </p>
4
13
 
5
14
  PyREUser3 是一个纯 Python 包,用于在 RE Engine 的 `.user.3` 数据库文件和 JSON 之间进行双向转换。
6
15
 
@@ -115,6 +124,22 @@ converter.pack_file(
115
124
  )
116
125
  ```
117
126
 
127
+ 不写入 JSON 文件,直接把 `.user.3` 转成内存中的 JSON 兼容 Python 对象:
128
+
129
+ ```python
130
+ readable_data = converter.user3_to_json(
131
+ "input/OtomonData.user.3",
132
+ json_format="readable",
133
+ )
134
+
135
+ repack_data = converter.user3_to_json(
136
+ "input/OtomonData.user.3",
137
+ json_format="repack",
138
+ )
139
+ ```
140
+
141
+ 使用 `json_format="readable"` 时返回与 `export_file()` 一致的可读导出结构;使用 `json_format="repack"` 时返回可传给 `pack()` 的完整实例表结构。
142
+
118
143
  批量处理目录:
119
144
 
120
145
  ```python
@@ -4,9 +4,9 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "PyREUser3"
7
- version = "0.2.0"
7
+ version = "0.3.0"
8
8
  description = "Pure Python tools for converting RE Engine .user.3 files to and from JSON."
9
- readme = "README.md"
9
+ readme = "docs/PYPI.md"
10
10
  requires-python = ">=3.9"
11
11
  license = "MIT"
12
12
  license-files = ["LICENSE"]
@@ -11,7 +11,7 @@ import inspect
11
11
  import json
12
12
  import re
13
13
  from pathlib import Path
14
- from typing import Any, Callable, Optional
14
+ from typing import Any, Callable, Literal, Optional
15
15
 
16
16
  from .core import RSZ_MAGIC, USR_MAGIC
17
17
  from .export import User3Exporter
@@ -20,6 +20,7 @@ from .pack import User3Packer
20
20
  # Preserve the exported JSON structure so external scripts and hand-edited files remain
21
21
  # compatible across workflows.
22
22
  JsonTree = Any
23
+ JsonFormat = Literal["readable", "repack"]
23
24
  # Patch callbacks may accept only the parsed data or both the data and source
24
25
  # path; returning None means the callback mutated in place.
25
26
  PatchCallback = Callable[..., Optional[JsonTree]]
@@ -104,7 +105,11 @@ class REUser3Converter:
104
105
  # Reuse parse_file so single-file and batch exports keep the same parsed JSON shape and metadata handling.
105
106
  # Preserve the exported JSON structure so external scripts and hand-edited files
106
107
  # remain compatible across workflows.
107
- tree = self.parse_file(user3_path, round_floats=True)
108
+ tree = self.user3_to_json(
109
+ user3_path,
110
+ json_format="readable",
111
+ round_floats=True,
112
+ )
108
113
  target = Path(json_path)
109
114
  target.parent.mkdir(parents=True, exist_ok=True)
110
115
 
@@ -112,6 +117,37 @@ class REUser3Converter:
112
117
  json.dump(tree, f, ensure_ascii=False, indent=2)
113
118
  return target
114
119
 
120
+ def user3_to_json(
121
+ self,
122
+ user3_path: str | Path,
123
+ json_format: JsonFormat = "readable",
124
+ round_floats: bool = True,
125
+ ) -> JsonTree:
126
+ """Convert one .user.3 file to an in-memory JSON-compatible tree.
127
+
128
+ Args:
129
+ user3_path (str | Path): Path to the .user.3 file being parsed.
130
+ json_format (JsonFormat): Return "readable" for the same shape written by
131
+ export_file(), or "repack" for the full instance-table document accepted by
132
+ pack().
133
+ round_floats (bool): Whether readable-format floats should be rounded to four
134
+ decimal places.
135
+
136
+ Returns:
137
+ JsonTree: JSON-compatible Python data. The readable format preserves the
138
+ existing export shape; the repack format returns a dictionary with pack
139
+ metadata and instance tables.
140
+
141
+ Raises:
142
+ ValueError: json_format was not "readable" or "repack".
143
+ """
144
+ normalized_format = self._normalize_json_format(json_format)
145
+ if normalized_format == "readable":
146
+ return self.parse_file(user3_path, round_floats=round_floats)
147
+ if normalized_format == "repack":
148
+ return self.parse_pack_file(user3_path)
149
+ raise ValueError("json_format must be 'readable' or 'repack'")
150
+
115
151
  def parse_file(self, user3_path: str | Path, round_floats: bool = True) -> JsonTree:
116
152
  """Parse one .user.3 file into the compact exported JSON tree.
117
153
 
@@ -147,6 +183,23 @@ class REUser3Converter:
147
183
  self._prepare_exporter_metadata(exporter)
148
184
  return exporter._parse_user3_pack(Path(user3_path))
149
185
 
186
+ @staticmethod
187
+ def _normalize_json_format(json_format: str) -> str:
188
+ """Normalize the public in-memory JSON format selector.
189
+
190
+ Args:
191
+ json_format (str): Requested JSON output shape.
192
+
193
+ Returns:
194
+ str: Normalized format name.
195
+
196
+ Raises:
197
+ TypeError: The caller supplied a non-string format selector.
198
+ """
199
+ if not isinstance(json_format, str):
200
+ raise TypeError("json_format must be a string")
201
+ return json_format.strip().lower().replace("-", "_")
202
+
150
203
  def pack_directory(
151
204
  self,
152
205
  json_root: str | Path,
pyreuser3-0.2.0/PKG-INFO DELETED
@@ -1,165 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: PyREUser3
3
- Version: 0.2.0
4
- Summary: Pure Python tools for converting RE Engine .user.3 files to and from JSON.
5
- Author: Egg Targaryen
6
- License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/dzxrly/PyREUser3
8
- Project-URL: Repository, https://github.com/dzxrly/PyREUser3
9
- Project-URL: Issues, https://github.com/dzxrly/PyREUser3/issues
10
- Keywords: RE Engine,user.3,JSON,modding,RSZ
11
- Classifier: Development Status :: 4 - Beta
12
- Classifier: Intended Audience :: Developers
13
- Classifier: Operating System :: OS Independent
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3 :: Only
16
- Classifier: Programming Language :: Python :: 3.9
17
- Classifier: Programming Language :: Python :: 3.10
18
- Classifier: Programming Language :: Python :: 3.11
19
- Classifier: Programming Language :: Python :: 3.12
20
- Classifier: Programming Language :: Python :: 3.13
21
- Classifier: Programming Language :: Python :: 3.14
22
- Classifier: Topic :: File Formats
23
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
- Classifier: Topic :: Utilities
25
- Requires-Python: >=3.9
26
- Description-Content-Type: text/markdown
27
- License-File: LICENSE
28
- Requires-Dist: rich>=13.0
29
- Provides-Extra: dev
30
- Requires-Dist: build>=1.2; extra == "dev"
31
- Requires-Dist: twine>=5.0; extra == "dev"
32
- Dynamic: license-file
33
-
34
- # PyREUser3
35
-
36
- English | [简体中文](./docs/README.zh-CN.md)
37
-
38
- PyREUser3 is a pure Python package for converting RE Engine `.user.3` database files to JSON and packing compatible JSON back to `.user.3`.
39
-
40
- Install it with:
41
-
42
- ```bash
43
- pip install pyreuser3
44
- ```
45
-
46
- Import it with the same normalized package name:
47
-
48
- ```python
49
- from pyreuser3 import REUser3Converter
50
- ```
51
-
52
- ## What Is Included
53
-
54
- - `.user.3 -> JSON` export.
55
- - `JSON -> .user.3` packing.
56
- - A reusable Python API through `REUser3Converter`.
57
- - CLI commands through `pyreuser3`.
58
- - A local `.user.3` export Web UI through `pyreuser3-web`.
59
-
60
- This PyPI package intentionally does not include game resources, dumped game data, RE_RSZ templates, `il2cpp_dump.json`, `.msg.23` conversion tools, or repository-specific helper scripts.
61
-
62
- ## Requirements
63
-
64
- - Python 3.9 or newer.
65
- - A RE_RSZ schema JSON file for the target game/version.
66
- - An `il2cpp_dump.json` file when exporting readable enum labels.
67
- - One or more unpacked `.user.3` files.
68
-
69
- ## Command Line
70
-
71
- Export `.user.3` files to JSON:
72
-
73
- ```bash
74
- pyreuser3 export \
75
- -i <input-user3-file-or-directory> \
76
- -s <RE_RSZ-schema.json> \
77
- -o <json-output-directory> \
78
- -p <il2cpp_dump.json>
79
- ```
80
-
81
- Pack JSON back to `.user.3`:
82
-
83
- ```bash
84
- pyreuser3 pack \
85
- -j <input-json-file-or-directory> \
86
- -s <RE_RSZ-schema.json> \
87
- -o <user3-output-directory> \
88
- -p <il2cpp_dump.json>
89
- ```
90
-
91
- The `-p/--il2cpp-dump-path` option is required for export and optional for pack. Passing it during pack is recommended when enum names need to be resolved back to numeric values.
92
-
93
- Start the local `.user.3` export Web UI:
94
-
95
- ```bash
96
- pyreuser3-web --port 8765
97
- ```
98
-
99
- The Web UI only handles `.user.3` export. It does not pack files and does not provide `.msg.23` conversion.
100
-
101
- ## Python API
102
-
103
- ```python
104
- from pyreuser3 import REUser3Converter
105
-
106
- converter = REUser3Converter(
107
- schema_path="D:/schema/rsz_game.json",
108
- il2cpp_dump_path="D:/game/il2cpp_dump.json",
109
- )
110
-
111
- converter.export_file(
112
- "input/OtomonData.user.3",
113
- "json/OtomonData.user.3.json",
114
- )
115
-
116
- converter.pack_file(
117
- "json/OtomonData.user.3.json",
118
- "mod/OtomonData.user.3",
119
- )
120
- ```
121
-
122
- For stable patch-and-repack workflows, use `patch_file()` or `parse_pack_file()`:
123
-
124
- ```python
125
- from pyreuser3 import REUser3Converter
126
-
127
- converter = REUser3Converter(
128
- schema_path="D:/schema/rsz_game.json",
129
- il2cpp_dump_path="D:/game/il2cpp_dump.json",
130
- )
131
-
132
- def patch(data, source_path):
133
- # Modify the full instance-table JSON in place.
134
- return None
135
-
136
- converter.patch_file(
137
- "input/example.user.3",
138
- "output/example.user.3",
139
- patch,
140
- )
141
- ```
142
-
143
- ## Build From Source
144
-
145
- ```bash
146
- python -m pip install -U build twine
147
- python -m build
148
- python -m twine check dist/*
149
- ```
150
-
151
- Upload to TestPyPI first:
152
-
153
- ```bash
154
- python -m twine upload -r testpypi dist/*
155
- ```
156
-
157
- Then upload the same checked distribution files to PyPI:
158
-
159
- ```bash
160
- python -m twine upload dist/*
161
- ```
162
-
163
- ## License
164
-
165
- MIT License.
@@ -1,165 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: PyREUser3
3
- Version: 0.2.0
4
- Summary: Pure Python tools for converting RE Engine .user.3 files to and from JSON.
5
- Author: Egg Targaryen
6
- License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/dzxrly/PyREUser3
8
- Project-URL: Repository, https://github.com/dzxrly/PyREUser3
9
- Project-URL: Issues, https://github.com/dzxrly/PyREUser3/issues
10
- Keywords: RE Engine,user.3,JSON,modding,RSZ
11
- Classifier: Development Status :: 4 - Beta
12
- Classifier: Intended Audience :: Developers
13
- Classifier: Operating System :: OS Independent
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3 :: Only
16
- Classifier: Programming Language :: Python :: 3.9
17
- Classifier: Programming Language :: Python :: 3.10
18
- Classifier: Programming Language :: Python :: 3.11
19
- Classifier: Programming Language :: Python :: 3.12
20
- Classifier: Programming Language :: Python :: 3.13
21
- Classifier: Programming Language :: Python :: 3.14
22
- Classifier: Topic :: File Formats
23
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
- Classifier: Topic :: Utilities
25
- Requires-Python: >=3.9
26
- Description-Content-Type: text/markdown
27
- License-File: LICENSE
28
- Requires-Dist: rich>=13.0
29
- Provides-Extra: dev
30
- Requires-Dist: build>=1.2; extra == "dev"
31
- Requires-Dist: twine>=5.0; extra == "dev"
32
- Dynamic: license-file
33
-
34
- # PyREUser3
35
-
36
- English | [简体中文](./docs/README.zh-CN.md)
37
-
38
- PyREUser3 is a pure Python package for converting RE Engine `.user.3` database files to JSON and packing compatible JSON back to `.user.3`.
39
-
40
- Install it with:
41
-
42
- ```bash
43
- pip install pyreuser3
44
- ```
45
-
46
- Import it with the same normalized package name:
47
-
48
- ```python
49
- from pyreuser3 import REUser3Converter
50
- ```
51
-
52
- ## What Is Included
53
-
54
- - `.user.3 -> JSON` export.
55
- - `JSON -> .user.3` packing.
56
- - A reusable Python API through `REUser3Converter`.
57
- - CLI commands through `pyreuser3`.
58
- - A local `.user.3` export Web UI through `pyreuser3-web`.
59
-
60
- This PyPI package intentionally does not include game resources, dumped game data, RE_RSZ templates, `il2cpp_dump.json`, `.msg.23` conversion tools, or repository-specific helper scripts.
61
-
62
- ## Requirements
63
-
64
- - Python 3.9 or newer.
65
- - A RE_RSZ schema JSON file for the target game/version.
66
- - An `il2cpp_dump.json` file when exporting readable enum labels.
67
- - One or more unpacked `.user.3` files.
68
-
69
- ## Command Line
70
-
71
- Export `.user.3` files to JSON:
72
-
73
- ```bash
74
- pyreuser3 export \
75
- -i <input-user3-file-or-directory> \
76
- -s <RE_RSZ-schema.json> \
77
- -o <json-output-directory> \
78
- -p <il2cpp_dump.json>
79
- ```
80
-
81
- Pack JSON back to `.user.3`:
82
-
83
- ```bash
84
- pyreuser3 pack \
85
- -j <input-json-file-or-directory> \
86
- -s <RE_RSZ-schema.json> \
87
- -o <user3-output-directory> \
88
- -p <il2cpp_dump.json>
89
- ```
90
-
91
- The `-p/--il2cpp-dump-path` option is required for export and optional for pack. Passing it during pack is recommended when enum names need to be resolved back to numeric values.
92
-
93
- Start the local `.user.3` export Web UI:
94
-
95
- ```bash
96
- pyreuser3-web --port 8765
97
- ```
98
-
99
- The Web UI only handles `.user.3` export. It does not pack files and does not provide `.msg.23` conversion.
100
-
101
- ## Python API
102
-
103
- ```python
104
- from pyreuser3 import REUser3Converter
105
-
106
- converter = REUser3Converter(
107
- schema_path="D:/schema/rsz_game.json",
108
- il2cpp_dump_path="D:/game/il2cpp_dump.json",
109
- )
110
-
111
- converter.export_file(
112
- "input/OtomonData.user.3",
113
- "json/OtomonData.user.3.json",
114
- )
115
-
116
- converter.pack_file(
117
- "json/OtomonData.user.3.json",
118
- "mod/OtomonData.user.3",
119
- )
120
- ```
121
-
122
- For stable patch-and-repack workflows, use `patch_file()` or `parse_pack_file()`:
123
-
124
- ```python
125
- from pyreuser3 import REUser3Converter
126
-
127
- converter = REUser3Converter(
128
- schema_path="D:/schema/rsz_game.json",
129
- il2cpp_dump_path="D:/game/il2cpp_dump.json",
130
- )
131
-
132
- def patch(data, source_path):
133
- # Modify the full instance-table JSON in place.
134
- return None
135
-
136
- converter.patch_file(
137
- "input/example.user.3",
138
- "output/example.user.3",
139
- patch,
140
- )
141
- ```
142
-
143
- ## Build From Source
144
-
145
- ```bash
146
- python -m pip install -U build twine
147
- python -m build
148
- python -m twine check dist/*
149
- ```
150
-
151
- Upload to TestPyPI first:
152
-
153
- ```bash
154
- python -m twine upload -r testpypi dist/*
155
- ```
156
-
157
- Then upload the same checked distribution files to PyPI:
158
-
159
- ```bash
160
- python -m twine upload dist/*
161
- ```
162
-
163
- ## License
164
-
165
- MIT License.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes