Closed Dietr1ch closed 2 weeks ago
Hello,
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.
I took a stab at this, but I ended up moving it to an exploration branch (dev/exp/clap) as it turns out it needs more changes than what I'm willing to do in a single commit.
Yeah that's quite a lot of changes, I checked it out and looks pretty organized now.
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?