Skip to main content

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.

License: MIT Python 3.9+ macOS

๐ŸŽฏ 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

๐Ÿ“ฌ 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sortmeout-1.0.0.tar.gz (59.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sortmeout-1.0.0-py3-none-any.whl (56.1 kB view details)

Uploaded Python 3

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

Hashes for sortmeout-1.0.0.tar.gz
Algorithm Hash digest
SHA256 462ab388114abe6f765d0f458786b1e1926ecf8ee980c7b69e114aa9eaa35823
MD5 81fc5b9a51964b48c782722e0f91f4f3
BLAKE2b-256 8f540d3a044a5a08404d1cbb3cf93d5ff2d05c238a2024862c51838049e094b7

See more details on using hashes here.

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

Hashes for sortmeout-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7747580d6cdcadf15bfddf1f84be45ccf262b64cf6fa02edc783a19653a8f89f
MD5 cf05dcb1e99c677bf8cb577173ea877e
BLAKE2b-256 f3348e509ecece37ac0f5e45b9da5d4e86e3844e20fbde43fcfe53c029bd4e46

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page