<h1><img src="https://gitlab.com/whoatemybutte7/jsontextmc/-/raw/master/logo.png" width="64" height="64"> JSONTextMC</h1>
Minecraft uses two main systems for formatting text.
The Legacy format uses section symbols and hexadecimal color coding,
while the JSON format uses key-value pairs to color individual parts of text.
JSONTextMC is a module for translating legacy messages to and from JSON-formatted text.
Output is not valid JSON by itself, it must be translated into JSON with `json.loads()`.
Strict modes and inheritance of various JSON elements can be controlled.
Requires Python 3.10+.
## Table of Contents
- [Installation](#installation)
- [Supprt](#support)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)
## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install **JSONTextMC**.
```shell script
python3 -m pip install jsontextmc
```
See the package page on PyPi [here](https://pypi.org/project/jsontextmc).
Use the output in any place where a JsonTextComponent is accepted *(e.g. **/tellraw**, **/title**, **.json files**)*.
## Support
Supports all Vanilla Minecraft formatting codes:
- All [color codes](https://minecraft.gamepedia.com/Formatting_codes#Color_codes)
- All formatting codes
- Hexidecimal
- Alows both `#` and `x` as prefix codes
## Usage
Read the PyDocs in the module for details about usage. Essentially:
* ``to_json()``: Legacy -> JSON
* ``from_json()``: JSON -> Legacy
Strict and inheritance modes control how legacy text is handled and translated into JSON.
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
If there is an individual issue you would like to bring attention to, please
[open one here](https://gitlab.com/whoatemybutter/jsontextmc/issues/new).
## License
Distributed under the [GPLv3](https://choosealicense.com/licenses/gpl-3.0/) license.
*(visit [GNU's website](https://www.gnu.org/licenses/gpl-3.0.en.html))*
Raw data
{
"_id": null,
"home_page": "",
"name": "jsontextmc",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "minecraft,fonts,minecraft fonts,font exporting,minecraft opentype,minecraft font,minecraft export font,mc font,mc fonts,mcfonts",
"author": "WhoAteMyButter",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/53/88/0cf1dabd1dbc11630c791ff39edd31fb94648764e27cd341a4bb800289c1/jsontextmc-3.2.0.tar.gz",
"platform": null,
"description": "<h1><img src=\"https://gitlab.com/whoatemybutte7/jsontextmc/-/raw/master/logo.png\" width=\"64\" height=\"64\"> JSONTextMC</h1>\n\nMinecraft uses two main systems for formatting text.\n\nThe Legacy format uses section symbols and hexadecimal color coding,\nwhile the JSON format uses key-value pairs to color individual parts of text.\n\nJSONTextMC is a module for translating legacy messages to and from JSON-formatted text.\nOutput is not valid JSON by itself, it must be translated into JSON with `json.loads()`.\n\nStrict modes and inheritance of various JSON elements can be controlled.\n\nRequires Python 3.10+.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Supprt](#support)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install **JSONTextMC**.\n\n```shell script\npython3 -m pip install jsontextmc\n```\n\nSee the package page on PyPi [here](https://pypi.org/project/jsontextmc).\n\nUse the output in any place where a JsonTextComponent is accepted *(e.g. **/tellraw**, **/title**, **.json files**)*.\n\n## Support\n\nSupports all Vanilla Minecraft formatting codes:\n\n- All [color codes](https://minecraft.gamepedia.com/Formatting_codes#Color_codes)\n- All formatting codes\n- Hexidecimal\n - Alows both `#` and `x` as prefix codes\n\n## Usage\n\nRead the PyDocs in the module for details about usage. Essentially:\n* ``to_json()``: Legacy -> JSON\n* ``from_json()``: JSON -> Legacy\n\nStrict and inheritance modes control how legacy text is handled and translated into JSON.\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nIf there is an individual issue you would like to bring attention to, please\n[open one here](https://gitlab.com/whoatemybutter/jsontextmc/issues/new).\n\n## License\n\nDistributed under the [GPLv3](https://choosealicense.com/licenses/gpl-3.0/) license.\n*(visit [GNU's website](https://www.gnu.org/licenses/gpl-3.0.en.html))*\n",
"bugtrack_url": null,
"license": "GPL-3.0-or-later",
"summary": "Tool to translate old Minecraft formatting codes to the modern JSON format",
"version": "3.2.0",
"split_keywords": [
"minecraft",
"fonts",
"minecraft fonts",
"font exporting",
"minecraft opentype",
"minecraft font",
"minecraft export font",
"mc font",
"mc fonts",
"mcfonts"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "aeb89f3d041472f4d9b3369e97269bed",
"sha256": "b75449c3623ec63ee47fd0af326ca6d14f49134a2c74f2a215f3ebea8ad6016b"
},
"downloads": -1,
"filename": "jsontextmc-3.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "aeb89f3d041472f4d9b3369e97269bed",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 16390,
"upload_time": "2022-12-28T05:34:21",
"upload_time_iso_8601": "2022-12-28T05:34:21.427749Z",
"url": "https://files.pythonhosted.org/packages/89/10/91ab0fb36b0a0a412edf2eaaa5f9e361db6089c7c0edc341695280174bb6/jsontextmc-3.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "bb9bb4baaddf03ab8fa8c59c8083f8d5",
"sha256": "99f41c768937b54751d11a04309819c68b87f5680975781b52e35929e0ce809e"
},
"downloads": -1,
"filename": "jsontextmc-3.2.0.tar.gz",
"has_sig": false,
"md5_digest": "bb9bb4baaddf03ab8fa8c59c8083f8d5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 16089,
"upload_time": "2022-12-28T05:34:22",
"upload_time_iso_8601": "2022-12-28T05:34:22.854405Z",
"url": "https://files.pythonhosted.org/packages/53/88/0cf1dabd1dbc11630c791ff39edd31fb94648764e27cd341a4bb800289c1/jsontextmc-3.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-28 05:34:22",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "jsontextmc"
}