I’m excited to announce the release of Download Manager v0.1.0, an enhanced version of this lightweight Rust-based file organizer. This release marks a significant upgrade, adding new features, refining existing functionalities, and overcoming challenges to make Downloads folder management even more efficient.
What’s New in v0.1.0?
1. Initial Report Generation
When you first run the application, it generates an HTML report summarizing the state of your Downloads folder. This report provides insights into:
- Total number of files.
- Distribution of file types (e.g., Images, Videos, Documents).
- Storage usage by category.
This feature ensures users start with an immediate overview of their Downloads folder.
2. Weekly Reports
Every week, the application generates a detailed HTML report, including:
- File type breakdowns.
- Total size and number of files.
- Insights into unused files taking up space.
- Visual charts (pie and bar graphs) for better data representation.
These reports are automatically generated at the beginning of each week, keeping you informed without manual effort.
3. Unused File Management
Files not accessed for 30 days are now moved to a dedicated Unused folder. Within this folder, files are categorized into subdirectories like Images, Videos, and Documents, making it easier to revisit or clean up these files.
The Process of Adding New Features
Every feature in this release was driven by the goal of making file organization smarter and more intuitive. Here’s how I approached each addition:
Initial Report Generation
I started with the requirement to analyze the entire Downloads directory on the program's first run. Using Rust's efficient file-handling capabilities, I created an HTML report that’s both visually appealing and easy to read. Handling large directories was challenging, but with optimized file iteration and selective metadata extraction, this process is now seamless.
Weekly Reports
Automating weekly reports involved tracking the last report’s generation using a report_status.txt file. This ensured reports are created at the right intervals. If the program wasn’t running during the scheduled time, the system checks the report generation status on the next startup.
Unused File Handling
Defining "unused" files as those inactive for 30 days was the first step. Scanning large directories efficiently was another challenge, but by leveraging Rust’s performance-optimized file system libraries, I ensured the process doesn’t interrupt real-time monitoring.
Challenges and How I Overcame Them
File Stability During Monitoring
Temporary and incomplete files caused errors during processing. To handle this, I added a file stability check that waits until the file size remains constant before organizing it.
Visualizing Data
Generating visually appealing reports involved integrating Chart.js into the HTML reports. Converting file metadata into chart-friendly formats was tricky but rewarding. The result is an aesthetically pleasing report that combines functionality with design.
Automated Testing with GitHub Actions
Testing these features required simulating a Downloads environment. Using GitHub Actions, I automated the process by downloading sample files, running the application, and verifying outcomes. Challenges like handling network issues during downloads were resolved with retries and caching.
What’s Next?
While v0.1.0 introduces exciting features, I’m already planning for the future:
- Cross-Platform Support: Extend the tool to Linux and macOS.
- Customizable Rules: Allow users to define their own file organization rules.
- Cloud Integration: For users who want reports and organized files backed up.
Joeljaison391 / Downloads-Organizer
A Rust application designed to automate the organization of your downloads. It watches for new files and moves them to appropriate directories based on their extension, simplifying file management and improving workflow.
Download Manager
Overview
A lightweight Rust-based file monitoring and organizing tool designed to automatically segregate files downloaded into appropriate folders based on their type. The program monitors the Downloads folder for file events and organizes files into categories like Images, Videos, Documents, Archives, Audio, and Others.
Features
- File Monitoring: Monitors the Downloads folder for new files and organizes them based on file type.
- Stability Check: Waits for file stability before processing (e.g., for partially downloaded files).
- File Categorization: Automatically moves files into appropriate subfolders (e.g., Images, Videos, Documents).
-
Unused File Management: Identifies unused files and moves them to the
Unused
folder, organized by type. - Initial Report Generation: Generates a detailed report about the Downloads folder on the first run.
- Weekly Reports: Automatically generates a detailed weekly report summarizing the files in the Downloads folder.
-
Subdirectory Analysis: Includes all subdirectories (e.g.,
Images
,Videos
…
Download Manager v0.1.0 is a big step forward, and I’m thrilled to share it with you. If you haven’t tried it yet, head over to the release page and give it a go. Your feedback is invaluable, and I look forward to hearing your thoughts!
Top comments (0)