A program to ask questions on the command line and collect the results in JSON files. Questions and answers are defined in a JSON file. The Results are collected in a JSON file as well.
This is not a library.
questionnaire questions.json
Where questions.json
has to have the following structure:
[
{
"name": "An identifier for the question",
"prompt": "The actual question",
"answer": {
"kind": "see below",
"choices": [0, 1, 2, 3]
}
}
]
answer.kind
can be one of the following:
select
will ask the user to select something from a given set of options, defined inanswer.choices
.input
will ask for basic texteditor
will open the$EDITOR
to enter text
[
{
"name": "some_identifier",
"prompt": "The actual question",
"answer": {
"kind": "select",
"choices": [0, 1, 2, 3]
}
},
{
"name": "some_identifier",
"prompt": "The actual question",
"answer": {
"kind": "input"
}
},
{
"name": "some_identifier2",
"prompt": "The actual question",
"answer": {
"kind": "editor"
}
}
]
Use cargo release
to release a new version. This will push a new git tag and
trigger the appropriate GitHub Action workflow that in turn uploads a release
artifiact.