Hey, I see that src/cli/parser.rs parses the command line arguments in a sort of hand written way using clap.
clap has feature for deriving the parser code from structs (called derive), which is pretty neat.
I think we can have 3 sub-commands, download, history and resume, and that download can snag the threads, input-file and save-as flags as they are not needed by the other subcommands.
Also, having download as a sub-command may seem a bit of a burden (raswt download https://my_iri is longer than raswt https://my_iri, but there's a sort of hack to have a default subcommand that would avoid this extra typing).
I agree with you, keeping the flags organized will be neat and also eventually as the project grows the list of flags will increase too so it would be better to use derive feature.
Hi,
Hey, I see that src/cli/parser.rs parses the command line arguments in a sort of hand written way using clap.
clap has feature for deriving the parser code from structs (called
derive
), which is pretty neat.I think we can have 3 sub-commands,
download
,history
andresume
, and that download can snag the threads, input-file and save-as flags as they are not needed by the other subcommands.Also, having download as a sub-command may seem a bit of a burden (
raswt download https://my_iri
is longer thanraswt https://my_iri
, but there's a sort of hack to have a default subcommand that would avoid this extra typing).What do you think about it?