Fix pipeline order, add selective metadata stripping, rename case/regex

- Move watermark step after compress in processing pipeline to match
  design doc order (resize, adjustments, convert, compress, metadata,
  watermark, rename)
- Implement selective EXIF metadata stripping for Privacy and Custom
  modes using little_exif tag filtering (GPS, camera, software,
  timestamps, copyright categories)
- Add case conversion support to rename (none/lower/upper/title)
- Add regex find-and-replace on original filenames
- Wire case and regex controls in rename step UI to JobConfig
- Add regex crate dependency to pixstrip-core
This commit is contained in:
2026-03-06 18:12:18 +02:00
parent 5104d66aaf
commit a666fbad05
10 changed files with 208 additions and 17 deletions

View File

@@ -279,6 +279,10 @@ pub struct RenameConfig {
pub counter_start: u32,
pub counter_padding: u32,
pub template: Option<String>,
/// 0=none, 1=lowercase, 2=uppercase, 3=title case
pub case_mode: u32,
pub regex_find: String,
pub regex_replace: String,
}
impl RenameConfig {
@@ -290,18 +294,23 @@ impl RenameConfig {
width = self.counter_padding as usize
);
// Apply regex find-and-replace on the original name
let working_name = rename::apply_regex_replace(original_name, &self.regex_find, &self.regex_replace);
let mut name = String::new();
if !self.prefix.is_empty() {
name.push_str(&self.prefix);
}
name.push_str(original_name);
name.push_str(&working_name);
if !self.suffix.is_empty() {
name.push_str(&self.suffix);
}
name.push('_');
name.push_str(&counter_str);
name.push('.');
name.push_str(extension);
name
// Apply case conversion
let name = rename::apply_case_conversion(&name, self.case_mode);
format!("{}.{}", name, extension)
}
}