Skip to main content

Declarative local file pipelines in Python

Project description

Filemindr — Rule-Driven Local File Automation

Declarative local file pipelines for organizing your files.

filemindr lets you describe what should happen to your files — not how.
You define rules in YAML (extensions, regex, age, priority), and filemindr applies them safely with dry‑run support, conflict handling, and a clean CLI.

This project was built as a learning + portfolio tool focused on clarity, safety, and developer experience.


✨ Features

  • Declarative YAML configuration
  • Rule engine with priority (highest wins)
  • Match by:
    • File extensions
    • Regex on filename
    • File age (older_than_days)
  • Conflict policies:
    • rename
    • skip
    • overwrite
  • Dry-run mode (preview changes before touching files)
  • Summary report after each run
  • Proper logging levels (INFO / DEBUG)
  • Cross-platform (Windows, macOS, Linux)

📦 Installation

From PyPI (planned / when published)

pip install Filemindr

Or:

python -m pip install Filemindr

Local development

pip install -e .

With uv:

uv sync

🚀 Quick Start

Create a filemindr.yaml:

source: ~/Downloads
default_target: ~/Downloads/others
conflict_policy: rename

rules:
  - name: invoices
    priority: 100
    match:
      extensions: ["pdf"]
      regex: "(?i)invoice|nota|nf"
    action:
      move_to: ~/Downloads/finance/invoices

  - name: documents
    priority: 50
    match:
      extensions: ["pdf", "docx", "xlsx"]
    action:
      move_to: ~/Downloads/documents

  - name: images
    priority: 40
    match:
      extensions: ["jpg", "jpeg", "png", "webp"]
    action:
      move_to: ~/Downloads/images

  - name: old_installers
    priority: 80
    match:
      extensions: ["exe", "msi"]
      older_than_days: 14
    action:
      move_to: ~/Downloads/installers/old

Preview changes:

filemindr run --dry-run

Run for real:

filemindr run

Verbose mode (per-file logs):

filemindr run --log-level DEBUG

🧠 How it works

  1. Filemind scans the source directory
  2. Rules are evaluated by priority (highest first)
  3. The first matching rule wins
  4. Files are moved according to the selected conflict policy
  5. A summary is printed at the end

⚔ Conflict Policy

  • rename (default): creates file (1).ext, file (2).ext, etc
  • skip: ignores files that already exist
  • overwrite: replaces existing files

🧪 Development

Run tests:

uv run pytest

Project layout:

filemindr/
├── src/filemindr/
├── tests/
├── pyproject.toml
└── README.md

🛠 Status

Early alpha / experimental.

APIs may change.


📄 License

MIT


Roadmap

  • Watch mode (real-time folder monitoring)
  • Per-rule conflict policies
  • Copy instead of move
  • Trash support
  • Config validation

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

filemindr-0.1.0.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

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

filemindr-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file filemindr-0.1.0.tar.gz.

File metadata

  • Download URL: filemindr-0.1.0.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for filemindr-0.1.0.tar.gz
Algorithm Hash digest
SHA256 30971513f019da8ade1536cc6ad8116b08ff8e5e68c7a7d5a2b76a404c22f3dc
MD5 91792e5a6fd964e2502ea3d88731d4ab
BLAKE2b-256 5ea1c38f8c8714e089898a3e5766dd8858c57f88e598be5ee780a662dcccd5c6

See more details on using hashes here.

File details

Details for the file filemindr-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: filemindr-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for filemindr-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 318facc606cc7b3c82d68db22ff787a24a16d4ed2749f9f6cd942992b9192c12
MD5 07aa88d10a5cd0d5507c1870ba7634fe
BLAKE2b-256 8c1a9639062724cb08d7ea47b2a0e35905b02b8b4987a7f0c988904d162a1e38

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