organize-tool


Nameorganize-tool JSON
Version 3.2.3 PyPI version JSON
download
home_pagehttps://github.com/tfeldmann/organize
SummaryThe file management automation tool
upload_time2024-03-29 10:13:55
maintainerNone
docs_urlNone
authorThomas Feldmann
requires_python<4.0,>=3.9
licenseMIT
keywords file management automation tool organization rules yaml
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <!--<img width="623" height="168" src="https://github.com/tfeldmann/organize/raw/gh-pages/img/organize.svg?sanitize=true" alt="organize logo">-->
  <a href="https://tfeldmann.github.io/organize/changelog/" target="_blank"><img width="100%" src="https://github.com/tfeldmann/organize/blob/main/docs/img/organize-v3.jpg?raw=true" alt="organize v3 is out"></a>
</p>

<div align="center">

<a href="https://github.com/tfeldmann/organize/actions/workflows/tests.yml"><img src="https://github.com/tfeldmann/organize/actions/workflows/tests.yml/badge.svg" title="tests"></a>
<a href="https://organize.readthedocs.io/en/latest/?badge=latest"><img src="https://readthedocs.org/projects/organize/badge/?version=latest" title="Documentation Status"></a>
<a href="https://results.pre-commit.ci/latest/github/tfeldmann/organize/main"><img src="https://results.pre-commit.ci/badge/github/tfeldmann/organize/main.svg" title="pre-commit.ci status"></a>
<a href="https://github.com/tfeldmann/organize/blob/main/LICENSE.txt"><img src="https://img.shields.io/badge/license-MIT-blue.svg" title="License"></a>
<a href="https://pypi.org/project/organize-tool/"><img src="https://img.shields.io/pypi/v/organize-tool" title="PyPI Version"></a>

</div>

---

<p align="center"> <b>organize</b> - The file management automation tool
<br>
<a href="https://organize.readthedocs.io/" target="_blank">Full documentation at Read the docs</a>
</p>


## v3 is now available

The new version should be *much* faster and fix a lot of bugs. It also comes with
a some new actions, filters and options.

If you encounter any other bugs or problems during the migration, please reach out!

- [See the changelog](https://tfeldmann.github.io/organize/changelog/)
- [Migration guide](https://tfeldmann.github.io/organize/migrating/#migrating-from-v2-to-v3)

## 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).

### People use this for:

- Sorting and tagging pictures into various folder structures based on EXIF data
- Sorting and renaming PDF invoices based on file content
- Removing incomplete downloads from their ~/Downloads
- Cleaning up their ~/Desktop from unused files
- Freeing up disk space by removing duplicates
- Automating various business processes
- and many more

## Features

Some highlights include:

- 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.
- Powerful template engine.
- Inline python and shell commands as filters and actions for maximum flexibility.
- Everything can be simulated before touching your files.
- Works on macOS, Windows and Linux.
- Free and open source software.

## Getting started

### Installation

Only python 3.9+ is needed.
Install it via your package manager or from [python.org](https://python.org).

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

```bash
pip install -U organize-tool
```

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 new` and then `organize edit` to edit the configuration:

```yaml
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 show --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:

```sh
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:

```yml
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:

```yaml
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:

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

<!--<details markdown="1">
  <summary markdown="1">Advanced example</summary>

This example shows some advanced features like placeholder variables, pluggable
actions, limited recursion through subfolders and filesystems (FTP and ZIP):

This rule:

- Searches recursively in your documents folder (three levels deep) and on a FTP server
- for files with **pdf** or **docx** extension
- that have a created timestamp
- Asks for user confirmation for each file
- Moves them according to their extensions and **created** timestamps:
- `script.docx` will be moved to `~/Documents/DOCX/2018-01/script.docx`
- `demo.pdf` will be moved to `~/Documents/PDF/2016-12/demo.pdf`
- If this new is already taken, a counter is appended to the filename ("rename_new")
- Creates a zip backup file on your desktop containing all files.

```yaml
rules:
  - name: "Download, cleanup and backup"
    locations:
      - path: ~/Documents
        max_depth: 3
      - path: ftps://demo:demo@demo.wftpserver.com
    filters:
      - extension:
          - pdf
          - docx
      - created
    actions:
      - confirm:
          msg: "Really continue?"
          default: true
      - move:
          dest: "~/Documents/{extension.upper()}/{created.strftime('%Y-%m')}/"
          on_conflict: rename_new
      - copy: "zip:///Users/thomas/Desktop/backup.zip"
```

</details>-->

You'll find many more examples in the <a href="https://tfeldmann.github.io/organize" target="_blank">full documentation</a>.

## Command line interface

```txt
organize - The file management automation tool.

Usage:
  organize run   [options] [<config>]
  organize sim   [options] [<config>]
  organize new   [<config>]
  organize edit  [<config>]
  organize check [<config>]
  organize debug [<config>]
  organize show  [--path|--reveal] [<config>]
  organize list
  organize docs
  organize --version
  organize --help

Commands:
  run        Organize your files.
  sim        Simulate organizing your files.
  new        Creates a new config.
  edit       Edit the config file with $EDITOR.
  check      Check whether the config file is valid.
  debug      Shows the raw config parsing steps.
  show       Print the config to stdout.
               Use --reveal to reveal the file in your file manager
               Use --path to show the path to the file
  list       Lists config files found in the default locations.
  docs       Open the documentation.

Options:
  <config>                        A config name or path to a config file
  -W --working-dir <dir>          The working directory
  -F --format (default|jsonl)     The output format [Default: default]
  -T --tags <tags>                Tags to run (eg. "initial,release")
  -S --skip-tags <tags>           Tags to skip
  -h --help                       Show this help page.
```

## Other donation options:

ETH:

```
0x8924a060CD533699E230C5694EC95b26BC4168E7
```

BTC:

```
39vpniiZk8qqGB2xEqcDjtWxngFCCdWGjY
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tfeldmann/organize",
    "name": "organize-tool",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "file, management, automation, tool, organization, rules, yaml",
    "author": "Thomas Feldmann",
    "author_email": "mail@tfeldmann.de",
    "download_url": "https://files.pythonhosted.org/packages/af/4a/11b1925844ad5fc2c5da1f210650f637000ca14bdb6e9c303ab744191337/organize_tool-3.2.3.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <!--<img width=\"623\" height=\"168\" src=\"https://github.com/tfeldmann/organize/raw/gh-pages/img/organize.svg?sanitize=true\" alt=\"organize logo\">-->\n  <a href=\"https://tfeldmann.github.io/organize/changelog/\" target=\"_blank\"><img width=\"100%\" src=\"https://github.com/tfeldmann/organize/blob/main/docs/img/organize-v3.jpg?raw=true\" alt=\"organize v3 is out\"></a>\n</p>\n\n<div align=\"center\">\n\n<a href=\"https://github.com/tfeldmann/organize/actions/workflows/tests.yml\"><img src=\"https://github.com/tfeldmann/organize/actions/workflows/tests.yml/badge.svg\" title=\"tests\"></a>\n<a href=\"https://organize.readthedocs.io/en/latest/?badge=latest\"><img src=\"https://readthedocs.org/projects/organize/badge/?version=latest\" title=\"Documentation Status\"></a>\n<a href=\"https://results.pre-commit.ci/latest/github/tfeldmann/organize/main\"><img src=\"https://results.pre-commit.ci/badge/github/tfeldmann/organize/main.svg\" title=\"pre-commit.ci status\"></a>\n<a href=\"https://github.com/tfeldmann/organize/blob/main/LICENSE.txt\"><img src=\"https://img.shields.io/badge/license-MIT-blue.svg\" title=\"License\"></a>\n<a href=\"https://pypi.org/project/organize-tool/\"><img src=\"https://img.shields.io/pypi/v/organize-tool\" title=\"PyPI Version\"></a>\n\n</div>\n\n---\n\n<p align=\"center\"> <b>organize</b> - The file management automation tool\n<br>\n<a href=\"https://organize.readthedocs.io/\" target=\"_blank\">Full documentation at Read the docs</a>\n</p>\n\n\n## v3 is now available\n\nThe new version should be *much* faster and fix a lot of bugs. It also comes with\na some new actions, filters and options.\n\nIf you encounter any other bugs or problems during the migration, please reach out!\n\n- [See the changelog](https://tfeldmann.github.io/organize/changelog/)\n- [Migration guide](https://tfeldmann.github.io/organize/migrating/#migrating-from-v2-to-v3)\n\n## About\n\nYour desktop is a mess? You cannot find anything in your downloads and\ndocuments? Sorting and renaming all these files by hand is too tedious?\nTime to automate it once and benefit from it forever.\n\n**organize** is a command line, open-source alternative to apps like Hazel (macOS)\nor File Juggler (Windows).\n\n### People use this for:\n\n- Sorting and tagging pictures into various folder structures based on EXIF data\n- Sorting and renaming PDF invoices based on file content\n- Removing incomplete downloads from their ~/Downloads\n- Cleaning up their ~/Desktop from unused files\n- Freeing up disk space by removing duplicates\n- Automating various business processes\n- and many more\n\n## Features\n\nSome highlights include:\n\n- Safe moving, renaming, copying of files and folders with conflict resolution options.\n- Fast duplicate file detection.\n- Exif tags extraction.\n- Categorization via text extracted from PDF, DOCX and many more.\n- Powerful template engine.\n- Inline python and shell commands as filters and actions for maximum flexibility.\n- Everything can be simulated before touching your files.\n- Works on macOS, Windows and Linux.\n- Free and open source software.\n\n## Getting started\n\n### Installation\n\nOnly python 3.9+ is needed.\nInstall it via your package manager or from [python.org](https://python.org).\n\nInstallation is done via pip. Note that the package name is `organize-tool`:\n\n```bash\npip install -U organize-tool\n```\n\nThis command can also be used to update to the newest version. Now you can run `organize --help` to check if the installation was successful.\n\n### Create your first rule\n\nIn your shell, run `organize new` and then `organize edit` to edit the configuration:\n\n```yaml\nrules:\n  - name: \"Find PDFs\"\n    locations:\n      - ~/Downloads\n    subfolders: true\n    filters:\n      - extension: pdf\n    actions:\n      - echo: \"Found PDF!\"\n```\n\n> If you have problems editing the configuration you can run `organize show --reveal` to reveal the configuration folder in your file manager. You can then edit the `config.yaml` in your favourite editor.\n\nsave your config file and run:\n\n```sh\norganize run\n```\n\nYou will see a list of all `.pdf` files you have in your downloads folder (+ subfolders).\nFor now we only show the text `Found PDF!` for each file, but this will change soon...\n(If it shows `Nothing to do` you simply don't have any pdfs in your downloads folder).\n\nRun `organize edit` again and add a `move`-action to your rule:\n\n```yml\nactions:\n  - echo: \"Found PDF!\"\n  - move: ~/Documents/PDFs/\n```\n\nNow run `organize sim` to see what would happen without touching your files.\n\nYou will see that your pdf-files would be moved over to your `Documents/PDFs` folder.\n\nCongratulations, you just automated your first task. You can now run `organize run`\nwhenever you like and all your pdfs are a bit more organized. It's that easy.\n\n> 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!\n\n## Example rules\n\nHere are some examples of simple organization and cleanup rules. Modify to your needs!\n\nMove all invoices, orders or purchase documents into your documents folder:\n\n```yaml\nrules:\n  - name: \"Sort my invoices and receipts\"\n    locations: ~/Downloads\n    subfolders: true\n    filters:\n      - extension: pdf\n      - name:\n          contains:\n            - Invoice\n            - Order\n            - Purchase\n          case_sensitive: false\n    actions:\n      - move: ~/Documents/Shopping/\n```\n\nRecursively delete all empty directories:\n\n```yaml\nrules:\n  - name: \"Recursively delete all empty directories\"\n    locations:\n      - path: ~/Downloads\n    targets: dirs\n    subfolders: true\n    filters:\n      - empty\n    actions:\n      - delete\n```\n\n<!--<details markdown=\"1\">\n  <summary markdown=\"1\">Advanced example</summary>\n\nThis example shows some advanced features like placeholder variables, pluggable\nactions, limited recursion through subfolders and filesystems (FTP and ZIP):\n\nThis rule:\n\n- Searches recursively in your documents folder (three levels deep) and on a FTP server\n- for files with **pdf** or **docx** extension\n- that have a created timestamp\n- Asks for user confirmation for each file\n- Moves them according to their extensions and **created** timestamps:\n- `script.docx` will be moved to `~/Documents/DOCX/2018-01/script.docx`\n- `demo.pdf` will be moved to `~/Documents/PDF/2016-12/demo.pdf`\n- If this new is already taken, a counter is appended to the filename (\"rename_new\")\n- Creates a zip backup file on your desktop containing all files.\n\n```yaml\nrules:\n  - name: \"Download, cleanup and backup\"\n    locations:\n      - path: ~/Documents\n        max_depth: 3\n      - path: ftps://demo:demo@demo.wftpserver.com\n    filters:\n      - extension:\n          - pdf\n          - docx\n      - created\n    actions:\n      - confirm:\n          msg: \"Really continue?\"\n          default: true\n      - move:\n          dest: \"~/Documents/{extension.upper()}/{created.strftime('%Y-%m')}/\"\n          on_conflict: rename_new\n      - copy: \"zip:///Users/thomas/Desktop/backup.zip\"\n```\n\n</details>-->\n\nYou'll find many more examples in the <a href=\"https://tfeldmann.github.io/organize\" target=\"_blank\">full documentation</a>.\n\n## Command line interface\n\n```txt\norganize - The file management automation tool.\n\nUsage:\n  organize run   [options] [<config>]\n  organize sim   [options] [<config>]\n  organize new   [<config>]\n  organize edit  [<config>]\n  organize check [<config>]\n  organize debug [<config>]\n  organize show  [--path|--reveal] [<config>]\n  organize list\n  organize docs\n  organize --version\n  organize --help\n\nCommands:\n  run        Organize your files.\n  sim        Simulate organizing your files.\n  new        Creates a new config.\n  edit       Edit the config file with $EDITOR.\n  check      Check whether the config file is valid.\n  debug      Shows the raw config parsing steps.\n  show       Print the config to stdout.\n               Use --reveal to reveal the file in your file manager\n               Use --path to show the path to the file\n  list       Lists config files found in the default locations.\n  docs       Open the documentation.\n\nOptions:\n  <config>                        A config name or path to a config file\n  -W --working-dir <dir>          The working directory\n  -F --format (default|jsonl)     The output format [Default: default]\n  -T --tags <tags>                Tags to run (eg. \"initial,release\")\n  -S --skip-tags <tags>           Tags to skip\n  -h --help                       Show this help page.\n```\n\n## Other donation options:\n\nETH:\n\n```\n0x8924a060CD533699E230C5694EC95b26BC4168E7\n```\n\nBTC:\n\n```\n39vpniiZk8qqGB2xEqcDjtWxngFCCdWGjY\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "The file management automation tool",
    "version": "3.2.3",
    "project_urls": {
        "Documentation": "https://organize.readthedocs.io",
        "Homepage": "https://github.com/tfeldmann/organize",
        "Repository": "https://github.com/tfeldmann/organize"
    },
    "split_keywords": [
        "file",
        " management",
        " automation",
        " tool",
        " organization",
        " rules",
        " yaml"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "517e0bb454903863bf45bbfdba6b19d7c78dca92c8ad199ee8f61aea800f106b",
                "md5": "9684c928b2866ee516ade5aff91276ca",
                "sha256": "fd3ef148b06a41d8493df7ebb9129774c53247b890d2e955069479ea257d1f47"
            },
            "downloads": -1,
            "filename": "organize_tool-3.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9684c928b2866ee516ade5aff91276ca",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 67023,
            "upload_time": "2024-03-29T10:13:53",
            "upload_time_iso_8601": "2024-03-29T10:13:53.392718Z",
            "url": "https://files.pythonhosted.org/packages/51/7e/0bb454903863bf45bbfdba6b19d7c78dca92c8ad199ee8f61aea800f106b/organize_tool-3.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "af4a11b1925844ad5fc2c5da1f210650f637000ca14bdb6e9c303ab744191337",
                "md5": "0f7065fdc171c3096a4d9c5ebb4419b9",
                "sha256": "a7b5a776dbfd4b25b5e69f400a9b6b39dd9cf4d430ef0f18bc837d424a007b77"
            },
            "downloads": -1,
            "filename": "organize_tool-3.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "0f7065fdc171c3096a4d9c5ebb4419b9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 45624,
            "upload_time": "2024-03-29T10:13:55",
            "upload_time_iso_8601": "2024-03-29T10:13:55.998975Z",
            "url": "https://files.pythonhosted.org/packages/af/4a/11b1925844ad5fc2c5da1f210650f637000ca14bdb6e9c303ab744191337/organize_tool-3.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-29 10:13:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tfeldmann",
    "github_project": "organize",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "organize-tool"
}
        
Elapsed time: 0.27771s