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(value_hint = clap::ValueHint::FilePath)]
23 pub out_file: Option<std::path::PathBuf>,
24
25 #[arg(long)]
26 pub silent: bool
27}
28
29#[derive(Args)]
30pub struct DecArgs {
31 #[arg(value_hint = clap::ValueHint::FilePath)]
32 pub in_file: std::path::PathBuf,
33
34 #[arg(value_hint = clap::ValueHint::FilePath)]
35 pub out_file: std::path::PathBuf,
36
37 #[arg(long)]
38 pub silent: bool
39}
40
41#[derive(Args)]
42pub struct FetchArgs {
43 pub url: url::Url,
44
45 #[arg(value_hint = clap::ValueHint::FilePath)]
46 pub out_file: std::path::PathBuf,
47
48 #[arg(long)]
49 pub silent: bool
50}