• Stars
    star
    1,957
  • Rank 22,883 (Top 0.5 %)
  • Language
    Python
  • License
    MIT License
  • Created over 6 years ago
  • Updated 30 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The file management automation tool.

organize logo


organize - The file management automation tool
Full documentation at Read the docs

organize v2 is released!

This is a huge update with lots of improvements. Please backup all your important stuff before running and use the simulate option!

About

Your desktop is a mess? You cannot find anything in your downloads and documents? Sorting and renaming all these files by hand is too tedious? Time to automate it once and benefit from it forever.

organize is a command line, open-source alternative to apps like Hazel (macOS) or File Juggler (Windows).

Features

Some highlights include:

  • Free and open source. Please donate if it is useful for you!
  • Works on macOS, Windows and Linux
  • Safe moving, renaming, copying of files and folders with conflict resolution options
  • Fast duplicate file detection
  • Exif tags extraction
  • Categorization via text extracted from PDF, DOCX and many more
  • Supports remote file locations like FTP, WebDAV, S3 Buckets, SSH and many more
  • Powerful template engine
  • Inline python and shell commands as filters and actions for maximum flexibility
  • Everything can be simulated before touching your files.

Getting started

Installation

organize works on macOS, Windows and Linux.

Only python 3.6+ is needed. Install it via your package manager or from python.org.

Installation is done via pip. Note that the package name is organize-tool:

pip3 install -U organize-tool

If you want the text extraction capabilities, install with textract like this:

pip3 install -U "organize-tool[textract]"

This command can also be used to update to the newest version. Now you can run organize --help to check if the installation was successful.

Create your first rule

In your shell, run organize edit to edit the configuration:

rules:
  - name: "Find PDFs"
    locations:
      - ~/Downloads
    subfolders: true
    filters:
      - extension: pdf
    actions:
      - echo: "Found PDF!"

If you have problems editing the configuration you can run organize reveal to reveal the configuration folder in your file manager. You can then edit the config.yaml in your favourite editor.

save your config file and run:

organize run

You will see a list of all .pdf files you have in your downloads folder (+ subfolders). For now we only show the text Found PDF! for each file, but this will change soon... (If it shows Nothing to do you simply don't have any pdfs in your downloads folder).

Run organize edit again and add a move-action to your rule:

actions:
  - echo: "Found PDF!"
  - move: ~/Documents/PDFs/

Now run organize sim to see what would happen without touching your files.

You will see that your pdf-files would be moved over to your Documents/PDFs folder.

Congratulations, you just automated your first task. You can now run organize run whenever you like and all your pdfs are a bit more organized. It's that easy.

There is so much more. You want to rename / copy files, run custom shell- or python scripts, match names with regular expressions or use placeholder variables? organize has you covered. Have a look at the advanced usage example below!

Example rules

Here are some examples of simple organization and cleanup rules. Modify to your needs!

Move all invoices, orders or purchase documents into your documents folder:

rules:
  - name: "Sort my invoices and receipts"
    locations: ~/Downloads
    subfolders: true
    filters:
      - extension: pdf
      - name:
          contains:
            - Invoice
            - Order
            - Purchase
          case_sensitive: false
    actions:
      - move: ~/Documents/Shopping/

Recursively delete all empty directories:

rules:
  - name: "Recursively delete all empty directories"
    locations:
      - path: ~/Downloads
    targets: dirs
    subfolders: true
    targets: dirs
    filters:
      - empty
    actions:
      - delete

You'll find many more examples in the full documentation.

Command line interface

Usage: organize [OPTIONS] COMMAND [ARGS]...

  organize

  The file management automation tool.

Options:
  --version   Show the version and exit.
  -h, --help  Show this message and exit.

Commands:
  run     Organizes your files according to your rules.
  sim     Simulates a run (does not touch your files).
  edit    Edit the rules.
  check   Checks whether a given config file is valid.
  reveal  Reveals the default config file.
  schema  Prints the json schema for config files.
  docs    Opens the documentation.

Other donation options:

ETH:

0x8924a060CD533699E230C5694EC95b26BC4168E7

BTC:

39vpniiZk8qqGB2xEqcDjtWxngFCCdWGjY

More Repositories

1

simplematch

Minimal, super readable string pattern matching for python.
Python
173
star
2

gpsdclient

A simple gpsd client and python library.
Python
54
star
3

fretty.app

An interactive fretboard exploration tool for all stringed instruments.
Vue
31
star
4

Arduino-Blinkenlight

Non-blocking fading patterns for single LEDs.
C++
30
star
5

Sudoku

Use your webcam to detect and solve any 9x9 sudoku
Python
26
star
6

python-raumfeld

A pythonic library for discovering and controlling Teufel Raumfeld devices.
Python
23
star
7

Raumfeld-Desktop

Desktop Control Software for Teufel Raumfeld Loudspeakers
Python
12
star
8

Arduino-Timeout

Minimal, production-ready timeout library for Arduino. With pause / resume.
C++
11
star
9

tryagain

A simple and pythonic retry helper for calling unstable functions
Python
10
star
10

Arduino-MotorDriver

Generic Arduino interface for various motor drivers.
C++
5
star
11

Arduino-SchmittTrigger

A lightweight schmitt trigger for debouncing and filtering.
C++
5
star
12

QlockToo

A QlockTwo Remake
Python
4
star
13

Biorobotic-Arm

An Arduino controlled robotic arm with facetracking capabilities
Python
3
star
14

Thomdo

A simple PySide todo list
Python
3
star
15

font-awesome-png

All the font-awesome icons as png files
3
star
16

WordClock

A very thin word clock application written in QML
JavaScript
2
star
17

days360

Excel's DAYS360() formula for python.
Python
2
star
18

maze

A maze generator written in rust.
Rust
2
star
19

rust-schmitttrigger

Rust
1
star
20

MBWBTV-Sternefabrik

Kleines Geschicklichkeitsspiel für MBWBTV
Java
1
star
21

NagelSchreckenberg

Stausimulation
Java
1
star
22

TimeTableProblem

Generates a timetable for a small school
Prolog
1
star
23

MazeGen

Generate a maze with the help of a growing tree algorithm
Java
1
star
24

Baeckerei-Lensing

Website "Bäckerei Lensing"
PHP
1
star
25

Project-Euler

Python solutions for Project Euler
Python
1
star
26

Dijkstra

PySide Dijkstra Demo Application
Python
1
star
27

Vehicle-Evolution

Uses a genetic algorithm to create a working vehicle.
C
1
star
28

Vokabelcheck

Finds unknown vocabulary in latin texts
Python
1
star
29

Arduino-Button

C++
1
star
30

supersigma2-errorcodes

A python parser for DMC SuperSigma2 error codes
Python
1
star
31

Mecanum-Robot

Firmware and Simulator for controlling a vehicle with mecanum wheels
C++
1
star