Skip to content

v0.4.1: Add Prefix Removal Functionality

Choose a tag to compare

@jwliles jwliles released this 19 Jul 01:06
· 6 commits to main since this release
v0.4.1
8dbc451

🚀 New Feature: Prefix Removal

This release adds CNP-compliant prefix removal functionality to SMV, making it easy to remove common file prefixes from large collections of files.

✨ Key Features

  • Prefix Removal: Use CHANGE "prefix" INTO "" syntax to remove file prefixes
  • CNP Grammar Compliant: Seamlessly integrates with existing substring replacement
  • Perfect for Photo Collections: Ideal for removing camera prefixes like IMG_, DSC_, etc.
  • Preview Support: Use -p flag to preview changes before applying

📖 Usage Examples

# Remove IMG_ prefix from all JPG files (preview first)
smv CHANGE "IMG_" INTO "" . EXT:jpg -p

# Remove DSC prefix from PNG files
smv CHANGE "DSC" INTO "" pictures/ EXT:png

# Remove any prefix with filtering
smv CHANGE "prefix_" INTO "" /path/to/files/ -r

🔧 Technical Improvements

  • Rust Edition 2024: Migrated from Edition 2021 to 2024
  • Enhanced Performance: Using strip_prefix instead of manual string slicing
  • Comprehensive Testing: Added 11 new CLI integration tests
  • Better Error Handling: Improved clippy compliance and code quality

📚 Documentation

  • Updated README.md with prefix removal examples
  • Enhanced MANUAL.md with comprehensive usage documentation
  • Added detailed CHANGELOG.md for v0.4.1

🧪 Quality Assurance

  • ✅ All tests pass (25 total: 14 unit + 11 CLI tests)
  • ✅ Clippy checks pass with no errors
  • ✅ Code formatting verified
  • ✅ Functional testing confirmed

💾 Installation

# Install from crates.io
cargo install smv

# Update existing installation
cargo install --force smv

Perfect for managing large photo collections with common camera prefixes! 📸


Full Changelog: v0.4.0...v0.4.1