Package: organize-tool
organize- The file management automation toolFull documentation at Read the docsv3 is now availableThe new version should bemuchfaster 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 changelogMigration guideAboutYour 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.organizeis 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 dataSorting and renaming PDF invoices based on file contentRemoving incomplete downloads from their ~/DownloadsCleaning up their ~/Desktop from unused filesFreeing up disk space by removing duplicatesAutomating various business processesand many moreFeaturesSome 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 startedInstallationOnly python 3.9+ is needed.
Install it via your package manager or frompython.org.Installation is done via pip. Note that the package name isorganize-tool:pipinstall-Uorganize-toolThis command can also be used to update to the newest version. Now you can runorganize --helpto check if the installation was successful.Create your first ruleIn your shell, runorganize newand thenorganize editto edit the configuration:rules:-name:"FindPDFs"locations:-~/Downloadssubfolders:truefilters:-extension:pdfactions:-echo:"FoundPDF!"If you have problems editing the configuration you can runorganize show --revealto reveal the configuration folder in your file manager. You can then edit theconfig.yamlin your favourite editor.save your config file and run:organizerunYou will see a list of all.pdffiles you have in your downloads folder (+ subfolders).
For now we only show the textFound PDF!for each file, but this will change soon...
(If it showsNothing to doyou simply don't have any pdfs in your downloads folder).Runorganize editagain and add amove-action to your rule:actions:
  - echo: "Found PDF!"
  - move: ~/Documents/PDFs/Now runorganize simto see what would happen without touching your files.You will see that your pdf-files would be moved over to yourDocuments/PDFsfolder.Congratulations, you just automated your first task. You can now runorganize runwhenever 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 rulesHere 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:"Sortmyinvoicesandreceipts"locations:~/Downloadssubfolders:truefilters:-extension:pdf-name:contains:-Invoice-Order-Purchasecase_sensitive:falseactions:-move:~/Documents/Shopping/Recursively delete all empty directories:rules:-name:"Recursivelydeleteallemptydirectories"locations:-path:~/Downloadstargets:dirssubfolders:truefilters:-emptyactions:-deleteYou'll find many more examples in thefull documentation.Command line interfaceorganize - 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:0x8924a060CD533699E230C5694EC95b26BC4168E7BTC:39vpniiZk8qqGB2xEqcDjtWxngFCCdWGjY