TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ivan-1f/phichain/llms.txt
Use this file to discover all available pages before exploring further.
phichain-converter is a command-line tool that converts Phigros charts between different formats. It supports Official, Phichain, RPE, and Primitive chart formats.
Installation
The converter is included in the Phichain toolchain. Make sure you have Rust installed, then build the project:target/release/phichain-converter.
Usage
Basic Syntax
Arguments
The input chart format. Available formats:
official- Official Phigros formatphichain- Phichain native formatrpe- Re:PhiEdit formatprimitive- Primitive chart format
The output chart format. Same format options as input.
The path to the input chart file. Must be a file, not a directory.
Supported Formats
| Format | Description | Extension |
|---|---|---|
official | Official Phigros chart format | .json |
phichain | Phichain native format with compiler features | .json |
rpe | Re:PhiEdit format | .json |
primitive | Low-level primitive representation | .json |
Examples
Convert Official to Phichain
chart.phichain.json in the same directory.
Convert RPE to Official
my-chart.official.json
Convert to Primitive Format
Output
The converter will:- Convert the chart to an intermediate primitive representation
- Convert the primitive chart to the target format
- Save the output with the format name appended before the extension
Example Output
my-chart.phichain.json.
Batch Conversion
You can convert multiple charts using shell scripting:Error Handling
The converter will exit with an error message if:- The input file doesn’t exist
- The path points to a directory instead of a file
- The input file contains invalid JSON or chart data
- The conversion between formats fails
Common Errors
Conversion Process
All conversions go through the primitive format as an intermediate representation. This ensures consistent behavior and makes it easy to add new formats.
- Parse - Read and deserialize the input chart
- To Primitive - Convert to primitive representation
- From Primitive - Convert to target format
- Serialize - Write output file
Tips
- Always keep backups of your original charts before converting
- The primitive format is useful for debugging chart issues
- Some format-specific features may be lost during conversion
- Output files are named with the format appended (e.g.,
chart.phichain.json)
See Also
- Chart Formats - Detailed format specifications
- Phichain Renderer - Render charts to video
- Project API - Phichain project structure