Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nwesterhausen/mcdata-to-json
Node.js binary to create JSON from stats, playerdata, advancements, logs and chunks.
https://github.com/nwesterhausen/mcdata-to-json
cli json mca minecraft nbt
Last synced: 6 days ago
JSON representation
Node.js binary to create JSON from stats, playerdata, advancements, logs and chunks.
- Host: GitHub
- URL: https://github.com/nwesterhausen/mcdata-to-json
- Owner: nwesterhausen
- License: mit
- Created: 2019-02-05T12:58:55.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T08:39:18.000Z (about 1 year ago)
- Last Synced: 2024-12-29T02:35:01.382Z (8 days ago)
- Topics: cli, json, mca, minecraft, nbt
- Language: JavaScript
- Homepage:
- Size: 1.21 MB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mcdata-to-json
[![npm version](https://badge.fury.io/js/mcdata-to-json.svg)](https://badge.fury.io/js/mcdata-to-json)
[![Build Status](https://travis-ci.org/nwesterhausen/mcdata-to-json.svg?branch=master)](https://travis-ci.org/nwesterhausen/mcdata-to-json)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fnwesterhausen%2Fmcdata-to-json.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fnwesterhausen%2Fmcdata-to-json?ref=badge_shield)Node.js binary to create JSON from stats, playerdata, advancements, logs and chunks. See explanation of steps it takes to do this [here](docs/what-happens.md).
## Usage
CLI is available from npmjs.org. So you can simply do this:
```bash
npx mcdata-to-json --minecraftdir=/opt/minecraft
```Look for an output folder with the generated JSON (unless it fails to run, and you will see warnings/errors if that's the case.)
### CLI Options
| Option | Default Value | Description |
| ------------------ | ---------------- | ------------------------------------------------------------------------------ |
| --loglevel | `warn` | Specify log verbosity, one of `error`, `warn`, `info`, `debug` or `silly` |
| -v, --verbose | | More 'v's increase log verbosity (up to -vvv or --verbose --verbose --verbose) |
| -q, --quiet | | Decrease log verbosity (changes from `warn` to `error`) |
| -t, --minecraftdir | `/minecraft` | Specify the minecraft directory (containing the server.properites) |
| -o, --outputdir | `./output` | Specify output directory for generated JSON |
| -w, --workdir | `./mcdata_cache` | Specify a temporary directory that can be used while running |
| -v, --version | | Show version and exit |
| -h, --help | | Show help message and exit |### Environment Variables
You can define environment variables in lieu of using option switches. The prefix `MCTOJSON_` is needed before the defined switch (see full listing in `mcdata-to-json --help`). If you create a file `.env` in the root where you run mcdata-to-json, it will be used to populate the environment variables.
#### Common Variables
| Variable | Details |
| --------------------- | --------------------------------------------------------------------------- |
| MCTOJSON_LOGLEVEL | Set the log level, choose one of: `error`, `warn`, `info`, `debug`, `silly` |
| MCTOJSON_MINECRAFTDIR | Set the location of your minecraft folder |
| MCTOJSON_OUTPUTDIR | Set the output folder for generated JSON |## Generated Files
See the [docs](docs/created-files.md) for more information.
## Development
Use pnpm for dependency management when developing the project. If you don't have it, install it with either `npm install --global pnpm` or `yarn global add pnpm` then you can clone this repository and do `pnpm install` in the root and install dependencies.
## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fnwesterhausen%2Fmcdata-to-json.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fnwesterhausen%2Fmcdata-to-json?ref=badge_large)