Skip to content

Releases: cloudlein/rust-file-organizer

v0.3 — CLI Support (2025-11-27) — Latest-release

27 Nov 14:03
da8c87a

Choose a tag to compare

Added

  • Full command-line interface powered by clap 4.
  • Subcommands:
    • scan --path <directory>
    • organize --path <directory> --dry-run
  • --dry-run flag to preview file moves without performing changes.
  • Path validation with clear error output.
  • Improved configuration error handling to avoid panics when config.toml is missing.
  • Colorized terminal output for better readability.
  • Comprehensive CLI test suite:
    • Scan command parsing
    • Organize command & dry-run parsing
    • Invalid/missing argument handling
  • Integration of CLI with main execution flow.

Improved

  • Adjusted scan output ordering to display messages before scanning starts.
  • Streamlined error messaging and user feedback.
  • Refined internal module structure for long-term maintainability.

Notes

This milestone establishes a robust CLI layer, preparing the application for the next phase: file moving and organizing logic (planned for v0.4).


v0.2.0 — File Grouping (2025-11-25) — Previous-release

Added

  • Dynamic file grouping using HashMap<String, Vec<String>>.
  • Modular architecture with new functions:
    • read_file() — directory traversal
    • extract_extension() — extract & normalize file extensions
    • classify() — map extensions to categories
    • group_file() — organize file paths into category lists
  • Error handling for:
    • Files without extensions
    • Unsupported file types
  • Console output to display categorized results.
  • Test coverage validating grouping logic with temporary directories.

Improved

  • Major refactoring to increase maintainability and scalability.
  • Transition from hardcoded struct-based grouping to config-driven logic.

Notes

This release sets the foundation for upcoming features such as CLI flags, file-moving operations, and JSON export.


v0.1.0 — Directory Scanner (Initial Release)

Added

  • Basic directory scanning using WalkDir.
  • Console output listing all detected files.
  • Minimal error handling.
  • Initial test coverage ensuring the scanner works with test directories.

v0.2.0 — File Grouping (2025-11-25)

25 Nov 11:58
b299998

Choose a tag to compare

Changelog

Added

  • Implemented dynamic file grouping using HashMap<String, Vec<String>>.
  • Added modular architecture with separate functions:
    • read_file() for directory traversal
    • extract_extension() for extension handling
    • classify() for category detection
    • group_file() for inserting file paths into categorized groups
  • Added error handling for:
    • Files without extensions
    • Unsupported file types
  • Implemented console output to display categorized results.

Improved

  • Code structure refactored to increase maintainability and scalability.
  • Test coverage improved to validate grouping logic.

Notes

This release transitions the project from hardcoded struct-based grouping to a dynamic configuration-driven system, preparing the foundation for future features like CLI flags, file moving actions, and JSON reporting.


Previous Release

v0.1.0 — Directory Scanner

  • Implemented basic directory scanning with WalkDir.
  • Printed list of detected files.
  • Added minimal error handling and initial test coverage.

Release v0.1 — Directory Scanner

22 Nov 20:57

Choose a tag to compare

This is the first milestone of the Rust File Organizer project. It implements a basic directory scanning functionality that lays the foundation for future features, including file grouping, CLI support, and file organization.


Features Implemented

  • Recursive directory scanning using the walkdir crate.
  • File categorization by extension into groups:
    • Archives (zip, rar, 7z)
    • Images (jpg, jpeg, png, gif)
    • Documents (pdf, docx, txt)
    • Videos (mp4)
  • Basic error handling:
    • Skip unreadable files or directories.
    • Warn about files without extensions.
    • Warn about unsupported file types.
  • Minimal unit testing using temporary directories (tempfile) to validate the grouping logic.
  • Console output of categorized file groups.

Files / Modules Updated

  • scanner.rs — main scanning logic
  • config.rs — configuration parsing from config.toml
  • main.rs / cli.rs — CLI argument handling
  • scan_tests.rs — temporary directory unit tests

Test Coverage

  • Verifies all configured extensions from config.toml.
  • Checks correct grouping into FileGroups.
  • Ensures unsupported or missing extensions are reported without panicking.

Usage Example

cargo run -- ./test_files

Expected output:

== File Groups ==
Archives:
  - ./test_files/old_backup.zip
Documents:
  - ./test_files/readme.txt
  - ./test_files/doc.pdf
Images:
  - ./test_files/image.png
Videos:
  - ./test_files/video.mp4