Allow getting module information in JSON format
Closes #243 (closed)
Required by sw/armarx/armarx-core!229 (merged), documentation!12 (merged)
Add --json
to axii module show
to produce JSON output without any decorations:
$ axii module show --help
Usage: axii module show [OPTIONS] MODULE_NAME
Show a module definition.
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --json Format the output in JSON without any decorations. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
$ axii module show armarx/ArmarXCore --json
{
"name": "armarx/ArmarXCore",
"general": {
"url": "https://git.h2t.iar.kit.edu/sw/armarx/armarx-core",
"authors": [
"Rainer Kartmann <rainer.kartmann@kit.edu>",
"Christian Dreher <c.dreher@kit.edu>"
],
"authors_parsed": {
"rainer.kartmann@kit.edu": "Rainer Kartmann",
"c.dreher@kit.edu": "Christian Dreher"
}
},
"update": {
"git": {
"ssh_url": "git@git.h2t.iar.kit.edu:sw/armarx/armarx-core.git",
"https_url": "https://git.h2t.iar.kit.edu/sw/armarx/armarx-core.git",
"h2t_gitlab_slug": "sw/armarx/armarx-core",
"submodules": false,
"prefer_https": false
},
"archives": {
"archives": []
}
},
"prepare": {
"cmake": {
"project_name": "ArmarXCore",
"definitions": {
"CMAKE_C_COMPILER": "$ARMARX_C_COMPILER",
"CMAKE_CXX_COMPILER": "$ARMARX_CXX_COMPILER"
},
"generator": {}
},
"python": {
"packages": {
"etc/python": {
"relative_path": "etc/python",
"python": "$AXII_DEFAULT_PYTHON_INTERPRETER",
"venv_name": ".venv",
"preinstall": [],
"install_editable": []
}
}
}
},
"build": {
"cmake": {
"env": {}
}
},
"install": {
"env": {}
},
"required_modules": {
"apt/ice": {
"features": []
},
"apt/jsoncpp": {
"features": []
},
"apt/lmdb": {
"features": []
},
"apt/sqlite3": {
"features": []
},
"apt/python3-argcomplete": {
"features": []
},
"# For python: (pip install zeroc-ice)": {
"features": []
},
"apt/bz2": {
"features": []
},
"simox": {
"features": []
},
"armarx/meta/compiler": {
"features": []
},
"tools/default_python_interpreter": {
"features": []
}
},
"features": {}
}
Currently, items with null
value are removed before printing.
Edited by Rainer Kartmann