updated readme

This commit is contained in:
sreedev
2022-12-29 22:22:03 -05:00
parent 1121bd3175
commit d472c7c601
3 changed files with 19 additions and 4 deletions

View File

@@ -3,3 +3,18 @@
<p align="center">
Find, Sort, Filter & Delete duplicate files
</p>
<h2 align="center">Usage</h2>
```bash
Usage: deduplicator [OPTIONS]
Options:
-t, --types <TYPES> Filetypes to deduplicate (default = all)
-d, --delete <DELETE> Delete files by algorithm (default = oldest) [options = oldest | newest]
--dir <DIR> Run Deduplicator on dir different from pwd
-h, --help Print help information
-V, --version Print version information
```
<h2 align="center">Screenshots</h2>

View File

@@ -6,10 +6,10 @@ use clap::Parser;
pub struct App {
/// Filetypes to deduplicate (default = all)
#[arg(short, long)]
pub filetypes: Option<String>,
/// List duplcates without deleting (default = true)
pub types: Option<String>,
/// Delete files by algorithm (default = oldest) [options = oldest | newest]
#[arg(short, long)]
pub dry: bool,
pub delete: Option<String>,
/// Run Deduplicator on dir different from pwd
#[arg(long)]
pub dir: Option<PathBuf>

View File

@@ -36,7 +36,7 @@ fn get_directory(opts: &App) -> Result<String> {
}
fn get_glob_patterns(opts: &App, directory: &String) -> Vec<PathBuf> {
opts.filetypes
opts.types
.clone()
.unwrap_or(String::from("*"))
.split(",")