fui
Add CLI & form interface to your program.
Note: Use it at own risk!!
Basic example
Cargo.toml
[]
= "0.9"
main.rs
// Example showing imagined CLI app. with two actions
extern crate clap;
extern crate fui;
use ;
use FormView;
use Text;
This will make the program automatically working in 2 modes:
-
Ready for parsing CLI arguments, like here:
& ) )
or
-
Ready for getting user input from easy and discoverable TUI interface, like image below:
More examples
Screens
TODO:
-
empty forms are skipped and executed
-
.validator(OneOf || Regex::new("v\d+.\d+.\d+")).unwrap()
- or something similiar
-
add option for prose help in widget?
-
add option for prose help in cmd-picker?
- "path" in "rustup toolchain link -h"
- perhaps adding new cmd is walkaround, like "link-help" which displays prose
-
reusing fields in form by cloning is stupid
-
command picker show only 5 items Oo
-
expose view's options (eg. submit_anything) on Autocomplete & Multiselect
-
reusing fields in each form, like "verbose for each form"
-
allow disabling copying (ctrl+k)
-
support user's history!
- make fill-error-correct flow pleasent
-
support for piping!
-
create wrapper FileField
-
create wrapper DirField
-
ctrl+enter submits (#151)?
-
checkbox: automatic toggle on char
-
add Field.data & form on_submit returns it?
-
optimalizations
- feeders use iterators
- thread
-
more tests
-
error handling & unwraps
-
magic stuff:
add magic which renders form for clap (or structopt) if args missingclap
should distinguish data types: file, dir, other
- add magic which works with current programs like: ls, grep, etc.