{"id":24064653,"url":"https://github.com/krwclassic/ptpl-cli-transcoder","last_synced_at":"2025-02-26T18:14:51.085Z","repository":{"id":270917540,"uuid":"911831964","full_name":"KRWCLASSIC/PTPL-CLI-Transcoder","owner":"KRWCLASSIC","description":"PTPL File content viewer, see the insights of PTPL files created by MCreator","archived":false,"fork":false,"pushed_at":"2025-01-04T16:41:31.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T02:03:11.582Z","etag":null,"topics":["cli","decoder","file","mcreator","mcree","minecraft","ptpl","python","python3","tool","xml"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/ptpl-transcoder/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KRWCLASSIC.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-04T01:00:02.000Z","updated_at":"2025-01-04T22:10:05.000Z","dependencies_parsed_at":"2025-01-04T03:21:23.032Z","dependency_job_id":"318dabea-e3b5-4916-86e8-c70ccc108ee7","html_url":"https://github.com/KRWCLASSIC/PTPL-CLI-Transcoder","commit_stats":null,"previous_names":["krwclassic/ptpl-cli-decoder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KRWCLASSIC%2FPTPL-CLI-Transcoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KRWCLASSIC%2FPTPL-CLI-Transcoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KRWCLASSIC%2FPTPL-CLI-Transcoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KRWCLASSIC%2FPTPL-CLI-Transcoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KRWCLASSIC","download_url":"https://codeload.github.com/KRWCLASSIC/PTPL-CLI-Transcoder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240907852,"owners_count":19876691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","decoder","file","mcreator","mcree","minecraft","ptpl","python","python3","tool","xml"],"created_at":"2025-01-09T10:39:34.891Z","updated_at":"2025-02-26T18:14:51.063Z","avatar_url":"https://github.com/KRWCLASSIC.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `PTPL` CLI Transcoder\n\n## Overview\n\nThe `PTPL` CLI Transcoder is a command-line tool designed to decode `.ptpl` files into `.xml` and encode `.xml` files back into `.ptpl` format. This tool is designed for working with PTPL files generated by the MCreator program.\n\n## How it Works\n\n### Decoding\n\nWhen decoding, the tool:\n\n1. Reads the `.ptpl` file as a gzip-compressed archive.\n2. Extracts and decodes the base64-encoded XML content.\n3. Formats the XML for readability.\n4. Outputs the result to the console or saves it to a specified file.\n\n### Encoding\n\nWhen encoding, the tool:\n\n1. Reads the XML file.\n2. Encodes the content into base64.\n3. Compresses the encoded data using gzip.\n4. Outputs the result to a `.ptpl` file.\n\n## Usage\n\nRun the `transcoder.py` script with the following syntax:\n\n```bash\npython transcoder.py [-d | -e] \u003cfile_path\u003e [--output \u003coutput_path\u003e] [--verbose]\n```\n\nOr download `ptpl-transcoder` package from PyPI!\n\n```bash\npip install ptpl-transcoder\n```\n\nAnd replace `python transcoder.py` in commands with `ptpl-transcoder`!\n\n### Arguments\n\n- `-d`, `--decode`: Decode a `.ptpl` file into XML.\n- `-e`, `--encode`: Encode an XML file into `.ptpl` format.\n- `\u003cfile_path\u003e`: The path to the input file. Use a `.ptpl` file for decoding or an XML file for encoding.\n- `--output`, `-o`: (Optional for decoding) Specify the path to save the output file. If not provided, decoded XML content is printed to the console.\n- `--verbose`, `-v`: (Optional) Enable verbose output for detailed processing information.\n\n## Examples\n\n### Decode a `.ptpl` File\n\nTo decode a `.ptpl` file and print the result:\n\n```bash\npython transcoder.py -d example.ptpl\n```\n\nTo decode a `.ptpl` file and save the XML to `output.xml`:\n\n```bash\npython transcoder.py -d example.ptpl -o output.xml\n```\n\n### Encode an XML File\n\nTo encode an XML file and save the `.ptpl` to `output.ptpl`:\n\n```bash\npython transcoder.py -e example.xml -o output.ptpl\n```\n\n## Notice\n\n\u003e **This tool is intended for use in the PTPL Editor project. PTPL files are generated by the MCreator program.**\n\n## Requirements\n\n- Python 3.x\n- Required libraries:\n  - `argparse`\n  - `base64`\n  - `gzip`\n  - `lxml`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrwclassic%2Fptpl-cli-transcoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrwclassic%2Fptpl-cli-transcoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrwclassic%2Fptpl-cli-transcoder/lists"}