You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: czkawka_cli/src/commands.rs
+102-24
Original file line number
Diff line number
Diff line change
@@ -127,20 +127,13 @@ pub struct DuplicatesArgs {
127
127
short,
128
128
long,
129
129
default_value = "HASH",
130
-
value_parser = parse_checking_method,
130
+
value_parser = parse_checking_method_duplicate,
131
131
help = "Search method (NAME, SIZE, HASH)",
132
132
long_help = "Methods to search files.\nNAME - Fast but but rarely usable,\nSIZE - Fast but not accurate, checking by the file's size,\nHASH - The slowest method, checking by the hash of the entire file"
133
133
)]
134
134
pubsearch_method:CheckingMethod,
135
-
#[clap(
136
-
short = 'D',
137
-
long,
138
-
default_value = "NONE",
139
-
value_parser = parse_delete_method,
140
-
help = "Delete method (AEN, AEO, ON, OO, HARD)",
141
-
long_help = "Methods to delete the files.\nAEN - All files except the newest,\nAEO - All files except the oldest,\nON - Only 1 file, the newest,\nOO - Only 1 file, the oldest\nHARD - create hard link\nNONE - not delete files"
// #[clap(short = 'D', long, help = "Delete found files")]
362
-
// delete_files: bool, TODO
358
+
#[clap(flatten)]
359
+
pubdelete_method:DMethod,
360
+
#[clap(flatten)]
361
+
pubdry_run:DryRun,
363
362
#[clap(
364
363
short = 'z',
365
364
long,
@@ -369,6 +368,15 @@ pub struct SameMusicArgs {
369
368
long_help = "Sets which rows must be equal to set this files as duplicates(may be mixed, but must be divided by commas)."
370
369
)]
371
370
pubmusic_similarity:MusicSimilarity,
371
+
#[clap(
372
+
short,
373
+
long,
374
+
default_value = "TAGS",
375
+
value_parser = parse_checking_method_same_music,
376
+
help = "Search method (CONTENT, TAGS)",
377
+
long_help = "Methods to search files.\nCONTENT - finds similar audio files by content, TAGS - finds similar images by tags, needs to set"
378
+
)]
379
+
pubsearch_method:CheckingMethod,
372
380
#[clap(flatten)]
373
381
pubfile_to_save:FileToSave,
374
382
#[clap(flatten)]
@@ -398,6 +406,53 @@ pub struct SameMusicArgs {
398
406
long_help = "Maximum size of checked files in bytes, assigning lower value may speed up searching"
399
407
)]
400
408
pubmaximal_file_size:u64,
409
+
#[clap(
410
+
short = 'l',
411
+
long,
412
+
value_parser = parse_minimum_segment_duration,
413
+
default_value = "10.0",
414
+
help = "Maximum size in bytes",
415
+
long_help = "Minimum segment duration, smaller value will finds also shorter similar segments, which may increase false positives number"
416
+
)]
417
+
pubminimum_segment_duration:f32,
418
+
#[clap(
419
+
short = 'd',
420
+
long,
421
+
value_parser = parse_maximum_difference,
422
+
default_value = "2.0",
423
+
help = "Maximum difference between segments",
424
+
long_help = "Maximum difference between segments, 0.0 will find only identical segments, 10.0 will find also segments which are almost not similar at all"
long_help = "Methods to delete the files.\nAEN - All files except the newest,\nAEO - All files except the oldest,\nON - Only 1 file, the newest,\nOO - Only 1 file, the oldest\nHARD - create hard link\nNONE - not delete files"
0 commit comments