{ "info": { "author": "Arcensoth", "author_email": "arcensoth@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6" ], "description": "# Minecraft Command Query\nMinecraft command query program. Inspired by the in-game help command, with added features like multiple version support and expandable regex search.\n\n[![package-badge]](https://pypi.python.org/pypi/mccq/)\n[![version-badge]](https://pypi.python.org/pypi/mccq/)\n\n## Installation\nRequires Python 3.6+, recommended with [virtualenv](https://virtualenv.pypa.io/en/stable/) or the like. Just install with `pip`:\n\n```\npip install mccq\n```\n\n## Database setup\nMCCQ requires access to generated server files (namely `commands.json`), and so is compatible with [Minecraft snapshot 18w01a](https://minecraft.net/en-us/article/minecraft-snapshot-18w01a) and up.\n\nEach version directory must remain as generated by the server, and all version directories should be in the same root database directory:\n\n```\ndatabase_root/\n 18w01a/\n generated/\n reports/\n commands.json\n 18w02a/\n generated/\n reports/\n commands.json\n```\n\nThese files can be loaded either from the local filesystem or [the internet](https://github.com/Arcensoth/mcdata).\n\n## Basic usage\nEnter the CLI (command line interface) by providing it a default version `-s` to query and a database location `-d` where version directories are located:\n```bash\npython -m mccq -s 18w01a -d \"https://raw.githubusercontent.com/Arcensoth/mcdata\"\n```\n\nStart with a basic command:\n```bash\n> say\n```\n\nThis produces some output:\n```bash\n# 18w01a\nsay \n```\nWhich will generally outline all possible variations of the command for the specified version(s).\n\nTry something a little more involved:\n```bash\n> effect\n# 18w01a\neffect clear|give ...\n```\nThe command is rolled out until a choice can be made, which saves on vertical space and is often more readable than assigning a separate line to each possibility.\n\n## Program options\nVarious flags and options can be written **before the command query** to augment behaviour.\n\nNormally several subcommands/arguments are condensed to one line, but `-e` can be used to forcibly expand the command:\n```bash\n> -e effect\n# 18w01a\neffect clear \neffect clear \neffect give \neffect give \neffect give \neffect give \n```\nBe warned that this can cause a large amount of output for commands with many subcommands/arguments.\n\nSearch for specific subcommands/arguments:\n```bash\n> tag targets add\n# 18w01a\ntag add \n```\nNotice how arguments are shown between `<>` but can be searched by name just like subcommands.\n\nSpeaking of arguments, use `-t` to render their types:\n```bash\n> -t tag targets add\n# 18w01a\ntag add \n```\n\nUse `-v VERSION` to query a particular version:\n```bash\n> -v 18w02a execute\n# 18w02a\nexecute align|anchored|as|at|facing|if|in|positioned|rotated|run|store|unless ...\n```\n\nRepeat `-v VERSION` to query several versions at once:\n```bash\n> -v 18w01a -v 18w02a execute\n# 18w01a\nexecute align|as|at|if|offset|run|store|unless ...\n# 18w02a\nexecute align|anchored|as|at|facing|if|in|positioned|rotated|run|store|unless ...\n```\n\nFor more precise control than `-e` can offer, provide `-c CAPACITY` to define a threshold for expansion:\n```bash\n> -c 5 time set\n# 18w01a\ntime set day\ntime set midnight\ntime set night\ntime set noon\ntime set