Created
February 26, 2017 20:09
-
-
Save 13rac1/6dcd5e2eba57caaeff7ef6898e6a6464 to your computer and use it in GitHub Desktop.
Generate a Minecraft UUID ops.json with curl and jq given a comma separated list of usernames
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# 2017 https://github.com/eosrei/ | |
OPS=${1-notch,jeb} | |
echo -n "$OPS" \ | |
| jq --raw-input --slurp 'split(",")' - \ | |
| curl -H "Content-type: application/json" \ | |
-d @- \ | |
https://api.mojang.com/profiles/minecraft \ | |
| jq ".[].level = 4" | |
# Usage: | |
# ./get-ops-json.sh notch,jeb > ops.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment