verbatim_doc_comment
This commit is contained in:
parent
b40e010b59
commit
5244352a4c
14
src/main.rs
14
src/main.rs
|
|
@ -15,37 +15,31 @@ use std::path::PathBuf;
|
|||
#[command(author, version, about)]
|
||||
struct Args {
|
||||
/// Path to the directory where the files to be renamed are located.
|
||||
#[arg(short = 'i', long)]
|
||||
#[arg(short = 'i', long, verbatim_doc_comment)]
|
||||
path: PathBuf,
|
||||
|
||||
/// Regular expression pattern to match against the file names in the directory.
|
||||
///
|
||||
/// The pattern should contain match groups (expressed in parentheses).
|
||||
///
|
||||
/// Example: "S(\d+)E(\d+)"
|
||||
#[arg(short = 's', long)]
|
||||
#[arg(short = 's', long, verbatim_doc_comment)]
|
||||
pattern: String,
|
||||
|
||||
/// Replacement pattern for the matched file names.
|
||||
///
|
||||
/// You can use `{1}`, `{2}`, etc. to reference the match groups in the pattern.
|
||||
///
|
||||
/// There are also the following tags available:
|
||||
///
|
||||
/// * {full_name} - file name with extension
|
||||
///
|
||||
/// * {name} - file name without extension
|
||||
///
|
||||
/// * {ext} - extension
|
||||
///
|
||||
/// Example: "Season {1} Episode {2}.{ext}"
|
||||
#[arg(short = 'r', long)]
|
||||
#[arg(short = 'r', long, verbatim_doc_comment)]
|
||||
replacement: String,
|
||||
|
||||
/// File name wildcard to filter the files to be renamed in the directory.
|
||||
///
|
||||
/// For example, "*.mkv" will match all files with the ".mkv" extension.
|
||||
#[arg(short = 'w', long, default_value = "*")]
|
||||
#[arg(short = 'w', long, default_value = "*", verbatim_doc_comment)]
|
||||
wildcard: String,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue