Open-source file automation and organization tool for macOS
Project description
SortMeOut ๐โจ
An open-source file automation and organization tool for macOS, inspired by Noodlesoft Hazel.
๐ฏ Overview
SortMeOut watches folders you specify and automatically organizes files according to rules you create. Move, rename, tag, archive, or delete files based on name, date, type, content, and much more.
โจ Features
Core Features
- Folder Watching: Monitor multiple folders for file changes in real-time
- Rule-Based Organization: Create powerful rules with conditions and actions
- Pattern Matching: Use glob patterns, regex, and smart matching
- File Operations: Move, copy, rename, delete, archive files
- macOS Integration: Tags, Spotlight metadata, Finder comments
Conditions
- File name (contains, starts with, ends with, matches pattern)
- File extension/type (documents, images, videos, etc.)
- File size (greater than, less than, between)
- Date attributes (created, modified, accessed, added)
- File contents (text search, regex)
- macOS tags and Finder comments
- Source URL/application (where downloaded from)
- Nested conditions (AND, OR, NOT logic)
Actions
- Move to folder (with subfolder creation)
- Copy to folder
- Rename (with pattern substitution)
- Add/remove macOS tags
- Set Finder comments
- Archive (zip, tar, gzip)
- Delete / Move to Trash
- Run shell script
- Execute AppleScript
- Open with application
- Send notification
- Import to Photos/Music
Advanced Features
- Trash Management: Auto-clean trash based on age/size
- App Sweep: Detect and remove app support files when uninstalling
- Preview Mode: See what rules would do without executing
- Rule Import/Export: Share rules with others
- Logging: Detailed logs of all operations
- Menu Bar App: Quick access and status
๐ Quick Start
Installation
# Clone the repository
git clone https://github.com/yourusername/sortmeout.git
cd sortmeout
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Install the application
pip install -e .
Basic Usage
from sortmeout import SortMeOut, Rule, Condition, Action
# Create a new instance
app = SortMeOut()
# Add a folder to watch
app.add_folder("~/Downloads")
# Create a rule to organize PDF files
rule = Rule(
name="Organize PDFs",
conditions=[
Condition("extension", "equals", "pdf")
],
actions=[
Action("move", destination="~/Documents/PDFs")
]
)
# Add rule to the Downloads folder
app.add_rule("~/Downloads", rule)
# Start watching
app.start()
GUI Application
# Launch the GUI
sortmeout-gui
๐ Documentation
๐บ๏ธ Roadmap
Phase 1: Core Engine (v0.1.0) โ
- Folder monitoring with FSEvents
- Basic rule engine
- File conditions (name, extension, size, date)
- Basic actions (move, copy, rename, delete)
Phase 2: Advanced Conditions (v0.2.0)
- Content-based matching
- macOS metadata (tags, comments)
- Download source detection
- Compound conditions (AND/OR/NOT)
Phase 3: Advanced Actions (v0.3.0)
- Archive creation
- Shell script execution
- AppleScript integration
- Notifications
Phase 4: GUI & UX (v0.4.0)
- Menu bar application
- Rule editor interface
- Preview mode
- Activity log viewer
Phase 5: System Features (v0.5.0)
- Trash management
- App Sweep functionality
- Spotlight integration
- Photos/Music import
Phase 6: Polish & Release (v1.0.0)
- Performance optimization
- Comprehensive testing
- Documentation complete
- Community feedback integration
๐ ๏ธ Development
Prerequisites
- macOS 10.15 (Catalina) or later
- Python 3.9 or later
- Xcode Command Line Tools
Setup Development Environment
# Install development dependencies
pip install -r requirements-dev.txt
# Run tests
pytest
# Run with coverage
pytest --cov=sortmeout
# Type checking
mypy sortmeout
# Linting
flake8 sortmeout
black sortmeout
Project Structure
sortmeout/
โโโ sortmeout/ # Main package
โ โโโ __init__.py
โ โโโ app.py # Main application class
โ โโโ core/ # Core functionality
โ โ โโโ __init__.py
โ โ โโโ watcher.py # Folder watching (FSEvents)
โ โ โโโ rule.py # Rule definitions
โ โ โโโ condition.py # Condition types
โ โ โโโ action.py # Action types
โ โโโ conditions/ # Condition implementations
โ โโโ actions/ # Action implementations
โ โโโ macos/ # macOS-specific integrations
โ โโโ gui/ # GUI components
โ โโโ utils/ # Utility functions
โ โโโ config/ # Configuration management
โโโ tests/ # Test suite
โโโ docs/ # Documentation
โโโ examples/ # Example rules and scripts
โโโ resources/ # Icons, assets
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
Ways to Contribute
- Report bugs and request features via Issues
- Submit pull requests for bug fixes or new features
- Improve documentation
- Share your custom rules
- Help translate the application
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Inspired by Noodlesoft Hazel
- Built with watchdog for cross-platform file monitoring
- Uses PyObjC for macOS integration
๐ฌ Contact
- GitHub Issues: For bug reports and feature requests
- Discussions: For questions and community support
Note: This is an independent open-source project and is not affiliated with Noodlesoft.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sortmeout-1.0.0.tar.gz.
File metadata
- Download URL: sortmeout-1.0.0.tar.gz
- Upload date:
- Size: 59.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
462ab388114abe6f765d0f458786b1e1926ecf8ee980c7b69e114aa9eaa35823
|
|
| MD5 |
81fc5b9a51964b48c782722e0f91f4f3
|
|
| BLAKE2b-256 |
8f540d3a044a5a08404d1cbb3cf93d5ff2d05c238a2024862c51838049e094b7
|
File details
Details for the file sortmeout-1.0.0-py3-none-any.whl.
File metadata
- Download URL: sortmeout-1.0.0-py3-none-any.whl
- Upload date:
- Size: 56.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7747580d6cdcadf15bfddf1f84be45ccf262b64cf6fa02edc783a19653a8f89f
|
|
| MD5 |
cf05dcb1e99c677bf8cb577173ea877e
|
|
| BLAKE2b-256 |
f3348e509ecece37ac0f5e45b9da5d4e86e3844e20fbde43fcfe53c029bd4e46
|