Skip to content

Commit 0b3e3e9

Browse files
committed
Fix the CLI help
Neither audit nor list accept options. Added help text to clarify. Close #4 Signed-off-by: Hubert Figuière <hub@figuiere.net>
1 parent 195e4db commit 0b3e3e9

2 files changed

Lines changed: 23 additions & 3 deletions

File tree

src/bin/dumper/main.rs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,28 +31,46 @@ struct Args {
3131

3232
#[derive(Clone, Debug, Subcommand)]
3333
enum Command {
34+
/// Dump content of the library
3435
Dump(CommandArgs),
35-
Audit(CommandArgs),
36-
List(CommandArgs),
36+
/// Audit the library to find unhandled properties
37+
Audit(NoArgs),
38+
/// List all masters
39+
List(NoArgs),
40+
/// Print the library tree
3741
Tree(tree::TreeArgs),
3842
}
3943

44+
#[derive(Clone, Debug, Parser)]
45+
struct NoArgs {
46+
/// Path to the Aperture Library
47+
path: String,
48+
}
49+
4050
#[derive(Clone, Debug, Parser)]
4151
struct CommandArgs {
4252
#[arg(long)]
53+
/// Dump everything
4354
all: bool,
4455
#[arg(long)]
56+
/// Dump the albums
4557
albums: bool,
4658
#[arg(long)]
59+
/// Dump the versions (of images)
4760
versions: bool,
4861
#[arg(long)]
62+
/// Dump the masters
4963
masters: bool,
5064
#[arg(long)]
65+
/// Dump the folders
5166
folders: bool,
5267
#[arg(long)]
68+
/// Dump the keywords
5369
keywords: bool,
5470
#[arg(long)]
71+
/// Dump the volumes
5572
volumes: bool,
73+
/// Path to the Aperture Library
5674
path: String,
5775
}
5876

src/bin/dumper/tree.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Hubert Figuière
2+
* Copyright (C) 2023-2025 Hubert Figuière
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public
55
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -19,7 +19,9 @@ const TOP_LEVEL: &str = "LibraryFolder";
1919
#[derive(Clone, Debug, Parser)]
2020
pub(crate) struct TreeArgs {
2121
#[arg(long)]
22+
/// Don't display the masters
2223
skip_masters: bool,
24+
/// Path to the Aperture Library
2325
path: String,
2426
}
2527

0 commit comments

Comments
 (0)