mirror of
https://github.com/sreedevk/deduplicator.git
synced 2026-08-26 10:05:32 +00:00
The tool could only act on duplicates non-interactively or through a line-oriented per-group prompt. Add a full-screen terminal UI (--tui) for browsing and resolving them visually. The UI is a two-pane master/detail view: a list of duplicate groups and, for the selected group, its files with per-file deletion marks. Files can be marked individually or in bulk by a keep-strategy (newest/oldest/first/ last/shortest/shallowest, reused from the resolver) applied to the current group or to all groups at once. A footer tracks how many files are marked and how much space would be reclaimed. Deletion is gated behind an explicit confirmation, a group always keeps at least one file, and the highlighted file can be opened in the system default application. The design keeps the interaction logic pure and independently testable: an App model translates an abstract key event into an outcome, so navigation, marking, strategy application, and post-deletion model updates are all unit tested without a terminal. Rendering (ratatui) and the destructive file I/O live in the event loop, which restores the terminal on both normal exit and panic so a crash never leaves it broken. --tui is mutually exclusive with --keep and --interactive.
61 lines
1.3 KiB
TOML
61 lines
1.3 KiB
TOML
[package]
|
|
name = "deduplicator"
|
|
version = "0.3.2"
|
|
edition = "2021"
|
|
description = "find,filter and delete duplicate files"
|
|
repository = "https://github.com/sreedevk/deduplicator"
|
|
license = "MIT"
|
|
authors = [
|
|
"Sreedev Kodichath <sreedevpadmakumar@gmail.com>",
|
|
"Valentin Bersier <vbersier@gmail.com>",
|
|
"Dhruva Sagar <dhruva.sagar@gmail.com>",
|
|
]
|
|
|
|
[[bin]]
|
|
name = "deduplicator"
|
|
path = "src/main.rs"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
[dependencies]
|
|
anyhow = "1.0.68"
|
|
bytesize = "2.0.1"
|
|
chrono = "0.4.23"
|
|
clap = { version = "4.0.32", features = ["derive"] }
|
|
dirs = "6.0.0"
|
|
globwalk = "0.9.1"
|
|
gxhash = { version = "3.4.1", default-features = false }
|
|
indicatif = { version = "0.18.0", features = ["rayon"] }
|
|
memmap2 = "0.9.7"
|
|
open = "5.4.0"
|
|
pathdiff = "0.2.1"
|
|
prettytable-rs = "0.10.0"
|
|
ratatui = "0.30.2"
|
|
rayon = "1.6.1"
|
|
unicode-segmentation = "1.12.0"
|
|
|
|
[profile.release]
|
|
strip = true
|
|
opt-level = 3
|
|
lto = "thin"
|
|
debug = false
|
|
codegen-units = 1
|
|
|
|
# generated by 'cargo dist init'
|
|
[profile.dist]
|
|
inherits = "release"
|
|
|
|
[workspace.metadata.dist]
|
|
rust-toolchain-version = "1.87.0"
|
|
ci = ["github"]
|
|
targets = [
|
|
"x86_64-unknown-linux-gnu",
|
|
"x86_64-apple-darwin",
|
|
"x86_64-pc-windows-msvc",
|
|
"aarch64-apple-darwin",
|
|
]
|
|
cargo-dist-version = "0.0.7"
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3.20.0"
|
|
rand = "0.9.1"
|