#terminal #cli #questionnaire

tquest

Simple observable pattern implementation

3 unstable releases

0.3.1 Jul 3, 2024
0.3.0 Jul 3, 2024
0.2.1 Jul 1, 2024

#1256 in Command line utilities

Download history 14/week @ 2024-09-10 7/week @ 2024-09-17 15/week @ 2024-09-24 12/week @ 2024-10-01

66 downloads per month

MIT license

100KB
2.5K SLoC

ci crates.io

tquest

Rust library crate to implement terminal based questionnaires

Idea

Build a structure that guides through a set of cascaded questions, collect the related answers and use the bundled structe in the end to some further processing

Assumed Questions

  1. Do you want to do this questionaire? (y/N)
  2. What's your name? - string result, max length ...
  3. What's your day of birth? - string result, regexp check
  4. Do you have one or more siblings? (y/N) 4.1 What's the name of your sibling? 4.2 What's the date of birth of your sibling 4.3 Do you have further Siblings
  5. Do you worked already in a job? (y/N) 5.1. Where was that job? 5.2. What company you worked for? ...

Usage

cargo test -- --ignored

Dependencies

~7–15MB
~201K SLoC