mirror of
https://github.com/sreedevk/deduplicator.git
synced 2026-08-29 11:35:32 +00:00
updated ui temporarily to fix a bug, will add a seperate TUI
This commit is contained in:
11
README.md
11
README.md
@@ -10,12 +10,11 @@
|
||||
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
|
||||
-n, --nocache Don't use cache for indexing files (default = true)
|
||||
-h, --help Print help information
|
||||
-V, --version Print version information
|
||||
-t, --types <TYPES> Filetypes to deduplicate (default = all)
|
||||
--dir <DIR> Run Deduplicator on dir different from pwd
|
||||
-n, --nocache Don't use cache for indexing files (default = true)
|
||||
-h, --help Print help information
|
||||
-V, --version Print version information
|
||||
```
|
||||
<h2 align="center">Performance</h2>
|
||||
|
||||
|
||||
@@ -7,7 +7,14 @@ use std::{collections::HashMap, fs};
|
||||
use crate::params::Params;
|
||||
|
||||
fn format_path(path: &String, opts: &Params) -> String {
|
||||
format!("...{}", path.replace(&opts.get_directory().unwrap(), ""))
|
||||
let display_path = path.replace(&opts.get_directory().unwrap(), "");
|
||||
let display_range = if display_path.len() > 32 {
|
||||
&display_path[(display_path.len() - 32)..]
|
||||
} else {
|
||||
&display_path[..]
|
||||
};
|
||||
|
||||
format!("...{}", display_range)
|
||||
}
|
||||
|
||||
fn file_size(path: &String) -> String {
|
||||
|
||||
Reference in New Issue
Block a user