All Projects → tfeldmann → Organize

tfeldmann / Organize

Licence: mit
The file management automation tool.

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Organize

gq-gmc-control
Control tool for the GQ GMC Geiger Counters.
Stars: ✭ 34 (-96.15%)
Mutual labels:  command-line-tool, platform-independent
Genus
A general code generation tools for Go applications
Stars: ✭ 11 (-98.75%)
Mutual labels:  command-line-tool
Autophrase
AutoPhrase: Automated Phrase Mining from Massive Text Corpora
Stars: ✭ 835 (-5.44%)
Mutual labels:  automatic
Feflow
🚀 A command line tool aims to improve front-end engineer workflow and standard, powered by TypeScript.
Stars: ✭ 942 (+6.68%)
Mutual labels:  command-line-tool
Initior
A command line application that let's you initialize your new projects the right way, replaces npm and yarn's init 🎆
Stars: ✭ 17 (-98.07%)
Mutual labels:  command-line-tool
Elasticsearchjsonld
Generate JSON-LD @contexts from ElasticSearch JSON Mappings
Stars: ✭ 7 (-99.21%)
Mutual labels:  command-line-tool
Stronghold
Easily configure macOS security settings from the terminal.
Stars: ✭ 813 (-7.93%)
Mutual labels:  command-line-tool
Miqversions
Because naming is hard. Really, really hard.
Stars: ✭ 14 (-98.41%)
Mutual labels:  command-line-tool
Rocketz
Upload and distribute assets to OSS providers
Stars: ✭ 9 (-98.98%)
Mutual labels:  command-line-tool
Trek
Trek is a CLI/ncurses explorer for HashiCorp Nomad clusters.
Stars: ✭ 26 (-97.06%)
Mutual labels:  command-line-tool
Laminas Cli
Console command runner, exposing commands written in Laminas MVC and Mezzio components and applications
Stars: ✭ 25 (-97.17%)
Mutual labels:  command-line-tool
Hugo Elasticsearch
Generate Elasticsearch indexes for Hugo static sites by parsing front matter
Stars: ✭ 19 (-97.85%)
Mutual labels:  command-line-tool
Auto Cpufreq
Automatic CPU speed & power optimizer for Linux
Stars: ✭ 843 (-4.53%)
Mutual labels:  automatic
Przm
🎨 A simple, yet feature rich color picker and manipulator
Stars: ✭ 17 (-98.07%)
Mutual labels:  command-line-tool
Gita
Manage many git repos with sanity 从容管理多个git库
Stars: ✭ 865 (-2.04%)
Mutual labels:  command-line-tool
Automatic Ripping Machine
Automatic Ripping Machine (ARM) Scripts
Stars: ✭ 827 (-6.34%)
Mutual labels:  automatic
Ylva
Command line password manager for Unix-like operating systems
Stars: ✭ 23 (-97.4%)
Mutual labels:  command-line-tool
Composer Git Hooks
Easily manage git hooks in your composer config
Stars: ✭ 838 (-5.1%)
Mutual labels:  command-line-tool
Ecsctl
Command-line tool for managing AWS Elastic Container Service and Projects to run on it.
Stars: ✭ 15 (-98.3%)
Mutual labels:  command-line-tool
Tools
My tools
Stars: ✭ 11 (-98.75%)
Mutual labels:  command-line-tool

GitHub Issues Documentation Status License


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

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

Getting started

Installation

Python 3.5+ 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

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.

Creating your first rule

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

rules:
  - folders: ~/Downloads
    subfolders: true
    filters:
      - extension: pdf
    actions:
      - echo: "Found PDF!"

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

Alternatively you can run organize config --path to see the full path to your config.yaml)

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 config again and add a copy-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 filenames 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:
  # sort my invoices and receipts
  - folders: ~/Downloads
    subfolders: true
    filters:
      - extension: pdf
      - filename:
          contains:
            - Invoice
            - Order
            - Purchase
          case_sensitive: false
    actions:
      - move: ~/Documents/Shopping/

Move incomplete downloads older than 30 days into the trash:

rules:
  # move incomplete downloads older > 30 days into the trash
  - folders: ~/Downloads
    filters:
      - extension:
          - download
          - crdownload
          - part
      - lastmodified:
          days: 30
          mode: older
    actions:
      - trash

Delete empty files from downloads and desktop:

rules:
  # delete empty files from downloads and desktop
  - folders: 
      - ~/Downloads
      - ~/Desktop
    filters:
      - filesize: 0
    actions:
      - trash

Move screenshots into a "Screenshots" folder on your desktop:

rules:
  # move screenshots into "Screenshots" folder
  - folders: ~/Desktop
    filters:
      - filename:
          startswith: 'Screen Shot'
    actions:
      - move: ~/Desktop/Screenshots/

Organize your font downloads:

rules:
  # organize your font files but keep the folder structure:
  #   "~/Downloads/favourites/helvetica/helvetica-bold.ttf"
  #     is moved to
  #   "~/Documents/FONTS/favourites/helvetica/helvetica-bold.ttf"
  - folders: ~/Downloads/**/*.ttf
    actions:
      - Move: '~/Documents/FONTS/{relative_path}'

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

Advanced usage

This example shows some advanced features like placeholder variables, pluggable actions, recursion through subfolders and glob syntax:

rules:
  - folders: ~/Documents/**/*
    filters:
      - extension:
          - pdf
          - docx
      - created
    actions:
      - move: '~/Documents/{extension.upper}/{created.year}{created.month:02}/'
      - shell: 'open "{path}"'

Given we have two files in our ~/Documents folder (or any of its subfolders) named script.docx from january 2018 and demo.pdf from december 2016 this will happen:

  • script.docx will be moved to ~/Documents/DOCX/2018-01/script.docx
  • demo.pdf will be moved to ~/Documents/PDF/2016-12/demo.pdf
  • The files will be opened (open command in macOS) from their new location.
  • Note the format syntax for {created.month} to make sure the month is prepended with a zero.

Command line interface

The file management automation tool.

Usage:
    organize sim [--config-file=<path>]
    organize run [--config-file=<path>]
    organize config [--open-folder | --path | --debug] [--config-file=<path>]
    organize list
    organize --help
    organize --version

Arguments:
    sim             Simulate a run. Does not touch your files.
    run             Organizes your files according to your rules.
    config          Open the configuration file in $EDITOR.
    list            List available filters and actions.
    --version       Show program version and exit.
    -h, --help      Show this screen and exit.

Options:
    -o, --open-folder  Open the folder containing the configuration files.
    -p, --path         Show the path to the configuration file.
    -d, --debug        Debug your configuration file.

Full documentation: https://organize.readthedocs.io
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].