1use clap::{Parser, Subcommand, Args};
2
3#[derive(Parser)]
4#[command(version, about)]
5pub struct Cli {
6 #[command(subcommand)]
7 pub command: Command
8}
9
10#[derive(Subcommand)]
11pub enum Command {
12 Enc(EncArgs),
13 Dec(DecArgs),
14 Fetch(FetchArgs)
15}
16
17#[derive(Args)]
18pub struct EncArgs {
19 #[arg(value_hint = clap::ValueHint::FilePath)]
20 pub in_file: std::path::PathBuf,
21
22 #[arg(short, value_hint = clap::ValueHint::FilePath)]
23 pub out_file: Option<std::path::PathBuf>
24}
25
26#[derive(Args)]
27pub struct DecArgs {
28 #[arg(value_hint = clap::ValueHint::FilePath)]
29 pub in_file: std::path::PathBuf,
30
31 #[arg(value_hint = clap::ValueHint::FilePath)]
32 pub out_file: std::path::PathBuf
33}
34
35#[derive(Args)]
36pub struct FetchArgs {
37 pub url: url::Url,
38
39 #[arg(value_hint = clap::ValueHint::FilePath)]
40 pub out_file: std::path::PathBuf
41}