Expand description
§rusty-detox
A Rust port of Doug Harple’s detox(1) v3.0.1: sanitize messy filenames
through a configurable filter pipeline.
§Quick start
use rusty_detox::{DetoxBuilder, Sequence};
let detox = DetoxBuilder::new()
.sequence(Sequence::utf_8())
.build();
let clean = detox.sanitize("My Résumé (final v2).pdf");
// The closing paren before `.pdf` becomes `_`; trailing-trim only
// strips runs at the very ends of the basename, not before the extension.
assert_eq!(clean, "My_Resume_final_v2_.pdf");§Stability (lockstep SemVer)
Library and binary share a single crate version. The vendored upstream
translation tables (Table.utf_8, Table.iso8859_1) are frozen at
v3.0.1 — re-vendoring is a MAJOR semver bump.
Re-exports§
pub use error::DetoxError;pub use filter::Filter;pub use sequence::Sequence;
Modules§
- config
detoxrcconfig-file parser (FR-009/FR-010/FR-011, AD-010, US6).- error
- Public error type for the rusty-detox library API (FR-042).
- filter
- The Filter pipeline (FR-001..FR-007 + FR-039).
- planner
- Rename planner (FR-023/FR-024, AD-011, SC-029).
- renamer
- Atomic rename with EXDEV cross-device fallback (FR-025/FR-030, HINT-003).
- sequence
Sequence— ordered list ofFilters applied left-to-right (FR-008/FR-038).- tables
- Vendored translation tables from upstream
dharple/detoxv3.0.1 (HINT-001). - walker
- Recursive directory walker (FR-026/FR-027/FR-028, AD-014, HINT-002).
Structs§
- Detox
- Configured detox pipeline runner. Construct via
DetoxBuilder. - Detox
Builder - Builder for
Detox(FR-037). - Detox
Report - Summary report returned from
Detox::execute(FR-042). - Rename
Plan Entry - A single source→target rename mapping (FR-041).