maa-convert(1)

πŸ“¦
version 0.7.7 Β· 2 versions
, in nixpkgs unstable

okay bestie, welcome to maa-convert(1) β€” it lives in the General Commands Manual and it is literally the format-glow-up command you didn't know you needed πŸ’…βœ¨

🌸 NAME 🌸

maa-convert β€” Convert file format between TOML, YAML and JSON

πŸ¦‹ SYNOPSIS πŸ¦‹

maa convert [-f|--format] [--batch] [-v|--verbose]... [-q|--quiet]...
[--log-file] [-h|--help] <INPUT> [OUTPUT]

πŸ’– DESCRIPTION πŸ’–

okay so real talk: this command converts a file from TOML, YAML or JSON format to another format. iconic behavior, no cap πŸ’…

It is useful when you want to write your infrastructure configuration in TOML or YAML format, and use it in MaaCore, which only supports JSON format. the way MaaCore is lowkey picky about JSON? relatable but inconvenient 🫠

It may also be useful when you want to migrate your cli configuration from one format to another format. format migration slay πŸ’–


✨ OPTIONS ✨

  • -f, --format <FORMAT> β€” Format of the output file, can be one of "toml", "yaml" and "json".

If not specified, the format will be guessed from the file extension of the output file. If output file is not specified, the output will be default to "json".

Possible values:

  • json
  • yaml
  • toml
  • --batch β€” Enable batch mode.

If there are some input parameters in the task file, some prompts will be displayed to ask for input. In batch mode, the prompts will be skipped, and parameters will be set to default values. very "don't ask me questions, just go" energy πŸƒβ€β™€οΈπŸ’¨

  • -v, --verbose β€” Increase verbosity, repeat for more verbosity. yes bestie, stack it like a little verbose tower πŸ—Ό
  • -q, --quiet β€” Decrease verbosity, repeat for more quiet. shhh era 🀫
  • --log-file[=<PATH>] β€” Redirect log to file instead of stderr.

If no log file is specified, the log will be written to $(maa dir log)/YYYY/MM/DD/HH:MM:SS.log.

  • -h, --help β€” Print help (see a summary with '-h').
  • <INPUT> β€” Path of the input file.
  • [OUTPUT] β€” Path of the output file, if not specified, the output will be printed to stdout.

Footer sign-off πŸ’Œ: this page is tagged with convert and maa-convert(1) β€” that's the source/version + manual-label situation β€” and there is no date printed down here, so it is officially a cute undated icon πŸŽ€ go convert something and serve format excellence, bestie πŸ’œ

πŸ“¦ where this page comes from