mirror of
https://github.com/sreedevk/deduplicator.git
synced 2026-08-26 02:04:39 +00:00
updated readme
This commit is contained in:
15
README.md
15
README.md
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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(",")
|
||||
|
||||
Reference in New Issue
Block a user