henrybarreto / parachute

Parachute is a simple and fast way to share files.
MIT License
1 stars 0 forks source link

Build CLI client upload sub-command and its flags #1

Open henrybarreto opened 2 years ago

henrybarreto commented 2 years ago

Build the CLI sub-command upload with its flags without calling the internal logic.

Flags

Usage

when using with no flags, get the file name: photo.jpeg

parachute client upload photo.jpeg

when -p is set, get the value and the file name: Example123 and photo.jpeg

parachute client upload -p Example123 photo.jpeg

when -t is set, get the value and the file name: 1 and photo.jpeg

parachute client upload -t 1 photo.jpeg

when -a is set, get the value and the file name: 127.0.0.1 and photo.jpeg

parachute client upload -a 127.0.0.1 photo.jpeg

Where

You don't need to implement the client's; just create, through the clap build pattern, the sub-command and flags. https://github.com/henrybarreto/parachute/blob/6ad86fdb6a5a4f968b8d4d7b42652bc294f4b2b3/src/main.rs#L25-L29

henrybarreto commented 2 years ago

At present, you just need to implement the "flat" client, without the flags.