pypmxvmd 2.0.0__py3-none-any.whl

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.
pypmxvmd/__init__.py ADDED
@@ -0,0 +1,401 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ PyPMXVMD - Python MikuMikuDance File Parser
4
+
5
+ A Python library for parsing and modifying MikuMikuDance (MMD) files:
6
+ - VMD (Vocaloid Motion Data) - Motion and animation data
7
+ - PMX (PolygonMoviemaker eXtended) - 3D model data
8
+ - VPD (Vocaloid Pose Data) - Pose/frame data
9
+
10
+ Usage:
11
+ import pypmxvmd
12
+
13
+ # Parse VMD motion file
14
+ motion = pypmxvmd.load_vmd("motion.vmd")
15
+ pypmxvmd.save_vmd(motion, "modified_motion.vmd")
16
+
17
+ # Parse PMX model file
18
+ model = pypmxvmd.load_pmx("model.pmx")
19
+ pypmxvmd.save_pmx(model, "modified_model.pmx")
20
+
21
+ # Parse VPD pose file
22
+ pose = pypmxvmd.load_vpd("pose.vpd")
23
+ pypmxvmd.save_vpd(pose, "modified_pose.vpd")
24
+ """
25
+
26
+ from pathlib import Path
27
+ from typing import Union, Optional
28
+
29
+ # Import parsers
30
+ from .common.parsers.vmd_parser_nuthouse import VmdParserNuthouse as VmdParser
31
+ from .common.parsers.pmx_parser_nuthouse import PmxParserNuthouse as PmxParser
32
+ from .common.parsers.vpd_parser import VpdParser
33
+
34
+ # Import models for type hints
35
+ from .common.models.vmd import VmdMotion
36
+ from .common.models.pmx import PmxModel
37
+ from .common.models.vpd import VpdPose
38
+
39
+ __version__ = "2.0.0"
40
+ __author__ = "PyPMXVMD Team"
41
+ __description__ = "Python MikuMikuDance File Parser"
42
+
43
+ # Core parser instances (reused for efficiency)
44
+ _vmd_parser = VmdParser()
45
+ _pmx_parser = PmxParser()
46
+ _vpd_parser = VpdParser()
47
+
48
+
49
+ def load_vmd(file_path: Union[str, Path], more_info: bool = False) -> VmdMotion:
50
+ """
51
+ Load VMD motion file.
52
+
53
+ Args:
54
+ file_path: Path to VMD file
55
+ more_info: Whether to include additional parsing information
56
+
57
+ Returns:
58
+ VmdMotion object
59
+
60
+ Raises:
61
+ FileNotFoundError: If file doesn't exist
62
+ ValueError: If file format is invalid
63
+ """
64
+ return _vmd_parser.parse_file(file_path, more_info=more_info)
65
+
66
+
67
+ def save_vmd(motion: VmdMotion, file_path: Union[str, Path]) -> None:
68
+ """
69
+ Save VMD motion to file.
70
+
71
+ Args:
72
+ motion: VmdMotion object to save
73
+ file_path: Output file path
74
+
75
+ Raises:
76
+ ValueError: If motion data is invalid
77
+ IOError: If file cannot be written
78
+ """
79
+ _vmd_parser.write_file(motion, file_path)
80
+
81
+
82
+ def load_pmx(file_path: Union[str, Path], more_info: bool = False) -> PmxModel:
83
+ """
84
+ Load PMX model file.
85
+
86
+ Args:
87
+ file_path: Path to PMX file
88
+ more_info: Whether to include additional parsing information
89
+
90
+ Returns:
91
+ PmxModel object
92
+
93
+ Raises:
94
+ FileNotFoundError: If file doesn't exist
95
+ ValueError: If file format is invalid
96
+ """
97
+ return _pmx_parser.parse_file(file_path, more_info=more_info)
98
+
99
+
100
+ def save_pmx(model: PmxModel, file_path: Union[str, Path]) -> None:
101
+ """
102
+ Save PMX model to file.
103
+
104
+ Args:
105
+ model: PmxModel object to save
106
+ file_path: Output file path
107
+
108
+ Raises:
109
+ ValueError: If model data is invalid
110
+ IOError: If file cannot be written
111
+ """
112
+ _pmx_parser.write_file(model, file_path)
113
+
114
+
115
+ def load_vpd(file_path: Union[str, Path], more_info: bool = False) -> VpdPose:
116
+ """
117
+ Load VPD pose file.
118
+
119
+ Args:
120
+ file_path: Path to VPD file
121
+ more_info: Whether to include additional parsing information
122
+
123
+ Returns:
124
+ VpdPose object
125
+
126
+ Raises:
127
+ FileNotFoundError: If file doesn't exist
128
+ ValueError: If file format is invalid
129
+ """
130
+ return _vpd_parser.parse_file(file_path, more_info=more_info)
131
+
132
+
133
+ def save_vpd(pose: VpdPose, file_path: Union[str, Path]) -> None:
134
+ """
135
+ Save VPD pose to file.
136
+
137
+ Args:
138
+ pose: VpdPose object to save
139
+ file_path: Output file path
140
+
141
+ Raises:
142
+ ValueError: If pose data is invalid
143
+ IOError: If file cannot be written
144
+ """
145
+ _vpd_parser.write_file(pose, file_path)
146
+
147
+
148
+ # Convenience functions for auto-detection
149
+ def load(file_path: Union[str, Path], more_info: bool = False):
150
+ """
151
+ Automatically detect file type and load appropriate format.
152
+
153
+ Args:
154
+ file_path: Path to file
155
+ more_info: Whether to include additional parsing information
156
+
157
+ Returns:
158
+ VmdMotion, PmxModel, or VpdPose object
159
+
160
+ Raises:
161
+ ValueError: If file type cannot be determined or is unsupported
162
+ """
163
+ path = Path(file_path)
164
+ suffix = path.suffix.lower()
165
+
166
+ if suffix == '.vmd':
167
+ return load_vmd(file_path, more_info)
168
+ elif suffix == '.pmx':
169
+ return load_pmx(file_path, more_info)
170
+ elif suffix == '.vpd':
171
+ return load_vpd(file_path, more_info)
172
+ else:
173
+ raise ValueError(f"Unsupported file type: {suffix}")
174
+
175
+
176
+ def save(data, file_path: Union[str, Path]) -> None:
177
+ """
178
+ Automatically detect data type and save in appropriate format.
179
+
180
+ Args:
181
+ data: VmdMotion, PmxModel, or VpdPose object
182
+ file_path: Output file path
183
+
184
+ Raises:
185
+ ValueError: If data type is unsupported
186
+ """
187
+ if isinstance(data, VmdMotion):
188
+ save_vmd(data, file_path)
189
+ elif isinstance(data, PmxModel):
190
+ save_pmx(data, file_path)
191
+ elif isinstance(data, VpdPose):
192
+ save_vpd(data, file_path)
193
+ else:
194
+ raise ValueError(f"Unsupported data type: {type(data)}")
195
+
196
+
197
+ # ===== 文本解析和导出功能 =====
198
+
199
+ def load_vmd_text(file_path: Union[str, Path], more_info: bool = False) -> VmdMotion:
200
+ """
201
+ Load VMD motion file from text format.
202
+
203
+ Args:
204
+ file_path: Path to VMD text file
205
+ more_info: Whether to include additional parsing information
206
+
207
+ Returns:
208
+ VmdMotion object
209
+
210
+ Raises:
211
+ FileNotFoundError: If file doesn't exist
212
+ ValueError: If file format is invalid
213
+ """
214
+ return _vmd_parser.parse_text_file(file_path, more_info=more_info)
215
+
216
+
217
+ def save_vmd_text(motion: VmdMotion, file_path: Union[str, Path]) -> None:
218
+ """
219
+ Save VMD motion to text file.
220
+
221
+ Args:
222
+ motion: VmdMotion object to save
223
+ file_path: Output text file path
224
+
225
+ Raises:
226
+ ValueError: If motion data is invalid
227
+ IOError: If file cannot be written
228
+ """
229
+ _vmd_parser.write_text_file(motion, file_path)
230
+
231
+
232
+ def load_pmx_text(file_path: Union[str, Path], more_info: bool = False) -> PmxModel:
233
+ """
234
+ Load PMX model file from text format.
235
+
236
+ Args:
237
+ file_path: Path to PMX text file
238
+ more_info: Whether to include additional parsing information
239
+
240
+ Returns:
241
+ PmxModel object
242
+
243
+ Raises:
244
+ FileNotFoundError: If file doesn't exist
245
+ ValueError: If file format is invalid
246
+ """
247
+ return _pmx_parser.parse_text_file(file_path, more_info=more_info)
248
+
249
+
250
+ def save_pmx_text(model: PmxModel, file_path: Union[str, Path]) -> None:
251
+ """
252
+ Save PMX model to text file.
253
+
254
+ Args:
255
+ model: PmxModel object to save
256
+ file_path: Output text file path
257
+
258
+ Raises:
259
+ ValueError: If model data is invalid
260
+ IOError: If file cannot be written
261
+ """
262
+ _pmx_parser.write_text_file(model, file_path)
263
+
264
+
265
+ def load_vpd_text(file_path: Union[str, Path], more_info: bool = False) -> VpdPose:
266
+ """
267
+ Load VPD pose file from structured text format.
268
+
269
+ Args:
270
+ file_path: Path to VPD text file (can be original VPD or structured text)
271
+ more_info: Whether to include additional parsing information
272
+
273
+ Returns:
274
+ VpdPose object
275
+
276
+ Raises:
277
+ FileNotFoundError: If file doesn't exist
278
+ ValueError: If file format is invalid
279
+ """
280
+ return _vpd_parser.parse_text_file(file_path, more_info=more_info)
281
+
282
+
283
+ def save_vpd_text(pose: VpdPose, file_path: Union[str, Path]) -> None:
284
+ """
285
+ Save VPD pose to structured text file.
286
+
287
+ Args:
288
+ pose: VpdPose object to save
289
+ file_path: Output text file path
290
+
291
+ Raises:
292
+ ValueError: If pose data is invalid
293
+ IOError: If file cannot be written
294
+ """
295
+ _vpd_parser.write_text_file(pose, file_path)
296
+
297
+
298
+ def load_text(file_path: Union[str, Path], more_info: bool = False):
299
+ """
300
+ Automatically detect text file type and load appropriate format.
301
+
302
+ Args:
303
+ file_path: Path to text file
304
+ more_info: Whether to include additional parsing information
305
+
306
+ Returns:
307
+ VmdMotion, PmxModel, or VpdPose object
308
+
309
+ Raises:
310
+ ValueError: If file type cannot be determined or is unsupported
311
+ """
312
+ path = Path(file_path)
313
+
314
+ # Try to detect format by reading first few lines
315
+ try:
316
+ with open(path, 'r', encoding='utf-8') as f:
317
+ first_lines = [f.readline().strip() for _ in range(3)]
318
+ except UnicodeDecodeError:
319
+ # Try shift_jis encoding for VPD files
320
+ with open(path, 'r', encoding='shift_jis') as f:
321
+ first_lines = [f.readline().strip() for _ in range(3)]
322
+
323
+ # Check for file format indicators
324
+ if any('version:' in line for line in first_lines):
325
+ if any('boneframe_ct:' in line or 'morphframe_ct:' in line for line in first_lines):
326
+ return load_vmd_text(file_path, more_info)
327
+ elif any('vertex_count:' in line for line in first_lines):
328
+ return load_pmx_text(file_path, more_info)
329
+ elif first_lines[0] == "Vocaloid Pose Data file" or any('model_name:' in line for line in first_lines):
330
+ return load_vpd_text(file_path, more_info)
331
+
332
+ # Fallback to file extension
333
+ suffix = path.suffix.lower()
334
+ if suffix == '.txt':
335
+ # Try VMD text format first (most common)
336
+ try:
337
+ return load_vmd_text(file_path, more_info)
338
+ except ValueError:
339
+ try:
340
+ return load_pmx_text(file_path, more_info)
341
+ except ValueError:
342
+ return load_vpd_text(file_path, more_info)
343
+ else:
344
+ raise ValueError(f"Cannot determine text file format for: {file_path}")
345
+
346
+
347
+ def save_text(data, file_path: Union[str, Path]) -> None:
348
+ """
349
+ Automatically detect data type and save in appropriate text format.
350
+
351
+ Args:
352
+ data: VmdMotion, PmxModel, or VpdPose object
353
+ file_path: Output text file path
354
+
355
+ Raises:
356
+ ValueError: If data type is unsupported
357
+ """
358
+ if isinstance(data, VmdMotion):
359
+ save_vmd_text(data, file_path)
360
+ elif isinstance(data, PmxModel):
361
+ save_pmx_text(data, file_path)
362
+ elif isinstance(data, VpdPose):
363
+ save_vpd_text(data, file_path)
364
+ else:
365
+ raise ValueError(f"Unsupported data type: {type(data)}")
366
+
367
+
368
+ # Export public API
369
+ __all__ = [
370
+ # Version info
371
+ '__version__',
372
+ '__author__',
373
+ '__description__',
374
+
375
+ # Binary file functions
376
+ 'load_vmd',
377
+ 'save_vmd',
378
+ 'load_pmx',
379
+ 'save_pmx',
380
+ 'load_vpd',
381
+ 'save_vpd',
382
+
383
+ # Text file functions
384
+ 'load_vmd_text',
385
+ 'save_vmd_text',
386
+ 'load_pmx_text',
387
+ 'save_pmx_text',
388
+ 'load_vpd_text',
389
+ 'save_vpd_text',
390
+
391
+ # Auto-detection functions
392
+ 'load',
393
+ 'save',
394
+ 'load_text',
395
+ 'save_text',
396
+
397
+ # Model classes (for type hints)
398
+ 'VmdMotion',
399
+ 'PmxModel',
400
+ 'VpdPose',
401
+ ]
@@ -0,0 +1,310 @@
1
+ Metadata-Version: 2.4
2
+ Name: pypmxvmd
3
+ Version: 2.0.0
4
+ Summary: Wrapper for reading and modifying VMD and PMX files
5
+ Author-email: PyPMXVMD Team <pypmxvmd@example.com>
6
+ Project-URL: Homepage, https://github.com/pypmxvmd/pypmxvmd
7
+ Project-URL: Documentation, https://pypmxvmd.readthedocs.io/
8
+ Project-URL: Repository, https://github.com/pypmxvmd/pypmxvmd
9
+ Project-URL: Bug Tracker, https://github.com/pypmxvmd/pypmxvmd/issues
10
+ Keywords: mmd,mikumikudance,pmx,vmd,vpd,3d,animation
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Requires-Python: >=3.8
22
+ Description-Content-Type: text/markdown
23
+ Requires-Dist: typing-extensions>=4.0.0; python_version < "3.10"
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=6.0; extra == "dev"
26
+ Requires-Dist: pytest-cov>=2.0; extra == "dev"
27
+ Requires-Dist: black>=22.0; extra == "dev"
28
+ Requires-Dist: isort>=5.0; extra == "dev"
29
+ Requires-Dist: flake8>=4.0; extra == "dev"
30
+ Requires-Dist: mypy>=0.900; extra == "dev"
31
+ Provides-Extra: gui
32
+ Provides-Extra: translation
33
+ Requires-Dist: googletrans==4.0.0rc1; extra == "translation"
34
+ Provides-Extra: image
35
+ Requires-Dist: Pillow>=8.0.0; extra == "image"
36
+
37
+ # PyPMXVMD
38
+
39
+ Python MikuMikuDance File Parser Library
40
+
41
+ [![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/downloads/)
42
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
43
+ [![Version](https://img.shields.io/badge/version-2.0.0-orange.svg)](https://github.com/pypmxvmd/pypmxvmd)
44
+
45
+ PyPMXVMD is a Python library for parsing and modifying MikuMikuDance (MMD) files, supporting the following formats:
46
+
47
+ - **VMD** (Vocaloid Motion Data) - Motion/animation data
48
+ - **PMX** (Polygon Model eXtended) - 3D model data
49
+ - **VPD** (Vocaloid Pose Data) - Pose data
50
+
51
+ ## Features
52
+
53
+ - Full support for reading and writing VMD, PMX, and VPD files
54
+ - Conversion between binary and text formats
55
+ - Object-oriented API design, easy to use
56
+ - Complete type annotation support
57
+ - No external dependencies (core functionality)
58
+ - Supports Python 3.8+
59
+
60
+ ## Installation
61
+
62
+ ```bash
63
+ # Install from source
64
+ git clone https://github.com/pypmxvmd/pypmxvmd.git
65
+ cd pypmxvmd
66
+ pip install -e .
67
+
68
+ # Install development dependencies
69
+ pip install -e ".[dev]"
70
+ ```
71
+
72
+ ## Quick Start
73
+
74
+ ### Basic Usage
75
+
76
+ ```python
77
+ import pypmxvmd
78
+
79
+ # Load VMD motion file
80
+ motion = pypmxvmd.load_vmd("motion.vmd")
81
+ print(f"Bone frames: {len(motion.bone_frames)}")
82
+ print(f"Morph frames: {len(motion.morph_frames)}")
83
+
84
+ # Modify and save
85
+ pypmxvmd.save_vmd(motion, "modified_motion.vmd")
86
+
87
+ # Load PMX model file
88
+ model = pypmxvmd.load_pmx("model.pmx")
89
+ print(f"Vertices: {len(model.vertices)}")
90
+ print(f"Materials: {len(model.materials)}")
91
+
92
+ # Load VPD pose file
93
+ pose = pypmxvmd.load_vpd("pose.vpd")
94
+ print(f"Bone poses: {len(pose.bone_poses)}")
95
+ ```
96
+
97
+ ### Automatic Format Detection
98
+
99
+ ```python
100
+ import pypmxvmd
101
+
102
+ # Automatically detect file type and load
103
+ data = pypmxvmd.load("file.vmd") # Returns VmdMotion
104
+ data = pypmxvmd.load("file.pmx") # Returns PmxModel
105
+ data = pypmxvmd.load("file.vpd") # Returns VpdPose
106
+
107
+ # Automatically detect data type and save
108
+ pypmxvmd.save(motion, "output.vmd")
109
+ pypmxvmd.save(model, "output.pmx")
110
+ pypmxvmd.save(pose, "output.vpd")
111
+ ```
112
+
113
+ ### Text Format Conversion
114
+
115
+ PyPMXVMD supports converting binary files to readable text format for viewing and editing:
116
+
117
+ ```python
118
+ import pypmxvmd
119
+
120
+ # VMD -> Text
121
+ motion = pypmxvmd.load_vmd("motion.vmd")
122
+ pypmxvmd.save_vmd_text(motion, "motion.txt")
123
+
124
+ # Text -> VMD
125
+ motion = pypmxvmd.load_vmd_text("motion.txt")
126
+ pypmxvmd.save_vmd(motion, "motion.vmd")
127
+
128
+ # PMX -> Text
129
+ model = pypmxvmd.load_pmx("model.pmx")
130
+ pypmxvmd.save_pmx_text(model, "model.txt")
131
+
132
+ # VPD -> Text
133
+ pose = pypmxvmd.load_vpd("pose.vpd")
134
+ pypmxvmd.save_vpd_text(pose, "pose.txt")
135
+ ```
136
+
137
+ ### Using Parser Classes
138
+
139
+ If you need more control, you can use the parser classes directly:
140
+
141
+ ```python
142
+ from pypmxvmd import VmdParser, PmxParser, VpdParser
143
+
144
+ # VMD Parser
145
+ vmd_parser = VmdParser()
146
+ motion = vmd_parser.parse_file("motion.vmd", more_info=True)
147
+ vmd_parser.write_file(motion, "output.vmd")
148
+
149
+ # PMX Parser
150
+ pmx_parser = PmxParser()
151
+ model = pmx_parser.parse_file("model.pmx", more_info=True)
152
+ pmx_parser.write_file(model, "output.pmx")
153
+
154
+ # VPD Parser
155
+ vpd_parser = VpdParser()
156
+ pose = vpd_parser.parse_file("pose.vpd", more_info=True)
157
+ vpd_parser.write_file(pose, "output.vpd")
158
+ ```
159
+
160
+ ## Data Structures
161
+
162
+ ### VmdMotion (VMD Motion)
163
+
164
+ ```python
165
+ class VmdMotion:
166
+ header: VmdHeader # File header information
167
+ bone_frames: List[VmdBoneFrame] # Bone keyframes
168
+ morph_frames: List[VmdMorphFrame] # Morph keyframes
169
+ camera_frames: List[VmdCameraFrame] # Camera keyframes
170
+ light_frames: List[VmdLightFrame] # Light keyframes
171
+ shadow_frames: List[VmdShadowFrame] # Shadow keyframes
172
+ ik_frames: List[VmdIkFrame] # IK keyframes
173
+ ```
174
+
175
+ ### PmxModel (PMX Model)
176
+
177
+ ```python
178
+ class PmxModel:
179
+ header: PmxHeader # File header information
180
+ vertices: List[PmxVertex] # Vertex list
181
+ faces: List[int] # Face indices
182
+ textures: List[str] # Texture paths
183
+ materials: List[PmxMaterial] # Material list
184
+ bones: List[PmxBone] # Bone list
185
+ morphs: List[PmxMorph] # Morph list
186
+ frames: List[PmxFrame] # Display frames
187
+ rigidbodies: List[PmxRigidBody] # Rigidbody list
188
+ joints: List[PmxJoint] # Joint list
189
+ ```
190
+
191
+ ### VpdPose (VPD Pose)
192
+
193
+ ```python
194
+ class VpdPose:
195
+ model_name: str # Model name
196
+ bone_poses: List[VpdBonePose] # Bone pose list
197
+ morph_poses: List[VpdMorphPose] # Morph pose list
198
+ ```
199
+
200
+ ## API Reference
201
+
202
+ ### Core Functions
203
+
204
+ | Function | Description |
205
+ |------|------|
206
+ | `load_vmd(path)` | Load VMD file |
207
+ | `save_vmd(motion, path)` | Save VMD file |
208
+ | `load_pmx(path)` | Load PMX file |
209
+ | `save_pmx(model, path)` | Save PMX file |
210
+ | `load_vpd(path)` | Load VPD file |
211
+ | `save_vpd(pose, path)` | Save VPD file |
212
+ | `load(path)` | Auto-detect and load |
213
+ | `save(data, path)` | Auto-detect and save |
214
+
215
+ ### Text Format Functions
216
+
217
+ | Function | Description |
218
+ |------|------|
219
+ | `load_vmd_text(path)` | Load VMD from text |
220
+ | `save_vmd_text(motion, path)` | Save VMD as text |
221
+ | `load_pmx_text(path)` | Load PMX from text |
222
+ | `save_pmx_text(model, path)` | Save PMX as text |
223
+ | `load_vpd_text(path)` | Load VPD from text |
224
+ | `save_vpd_text(pose, path)` | Save VPD as text |
225
+ | `load_text(path)` | Auto-detect and load text |
226
+ | `save_text(data, path)` | Auto-detect and save text |
227
+
228
+ ## Project Structure
229
+
230
+ ```
231
+ pypmxvmd/
232
+ ├── pypmxvmd/ # Main package
233
+ │ ├── __init__.py # Public API
234
+ │ ├── common/ # Common components
235
+ │ │ ├── models/ # Data models
236
+ │ │ │ ├── vmd.py # VMD data structures
237
+ │ │ │ ├── pmx.py # PMX data structures
238
+ │ │ │ └── vpd.py # VPD data structures
239
+ │ │ └── parsers/ # Parsers
240
+ │ │ ├── vmd_parser_nuthouse.py
241
+ │ │ ├── pmx_parser_nuthouse.py
242
+ │ │ └── vpd_parser.py
243
+ │ └── presentation/ # Presentation layer
244
+ │ ├── cli/ # Command-line interface
245
+ │ └── gui/ # Graphical interface
246
+ ├── tests/ # Tests
247
+ ├── docs/ # Documentation
248
+ └── mmd_scripting/ # Legacy code (reference)
249
+ ```
250
+
251
+ ## Testing
252
+
253
+ ```bash
254
+ # Run all tests
255
+ pytest tests/ -v
256
+
257
+ # Run specific test
258
+ pytest tests/test_vmd_parser.py -v
259
+
260
+ # Run coverage test
261
+ pytest tests/ --cov=pypmxvmd --cov-report=html
262
+ ```
263
+
264
+ ## Development
265
+
266
+ ```bash
267
+ # Install development dependencies
268
+ pip install -e ".[dev]"
269
+
270
+ # Code formatting
271
+ black pypmxvmd/
272
+ isort pypmxvmd/
273
+
274
+ # Type checking
275
+ mypy pypmxvmd/
276
+
277
+ # Code linting
278
+ flake8 pypmxvmd/
279
+ ```
280
+
281
+ ## Version History
282
+
283
+ ### v2.0.0 (2024)
284
+ - Complete refactor to object-oriented architecture
285
+ - Added complete type annotations
286
+ - Support for text format export/import
287
+ - Improved error handling and validation
288
+ - Added progress callback support
289
+
290
+ ### v1.x (Original)
291
+ - Based on Nuthouse01's original implementation
292
+ - Functional API
293
+
294
+ ## Acknowledgments
295
+
296
+ This project is refactored from the original MMD scripting tools by [Nuthouse01](https://github.com/Nuthouse01/PMX-VMD-Scripting-Tools).
297
+
298
+ ## License
299
+
300
+ MIT License - See [LICENSE](LICENSE) file for details
301
+
302
+ ## Contributing
303
+
304
+ Issues and Pull Requests are welcome!
305
+
306
+ 1. Fork this repository
307
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
308
+ 3. Commit your changes (`git commit -m 'Add amazing feature'`)
309
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
310
+ 5. Create a Pull Request
@@ -0,0 +1,6 @@
1
+ pypmxvmd/__init__.py,sha256=qJTLsszW3oQeSzDOVqAkfICZTn9T1rd1R8B-0n_cimE,11109
2
+ pypmxvmd-2.0.0.dist-info/METADATA,sha256=vZiTeDer6575sT49V_558IVzIwYI0ThEZGih_rbd8CE,9408
3
+ pypmxvmd-2.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
4
+ pypmxvmd-2.0.0.dist-info/entry_points.txt,sha256=DlwfTmJVrun7fNPOZfFszZSX1C4gAnhNVYw-Jq1C0rY,65
5
+ pypmxvmd-2.0.0.dist-info/top_level.txt,sha256=fi5uwadKsAw7bFyMZr1uNgD7uqOAa7cwAJVj-Nshhm8,9
6
+ pypmxvmd-2.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ pypmxvmd = pypmxvmd.presentation.cli.main:main
@@ -0,0 +1 @@
1
+ pypmxvmd