First of all, thank you for being a long time user of organize
!
I tried to keep the amount of breaking changes small but could not avoid them completely. Feel free to pin organize to v1.x, but then you're missing the party.
Please open a issue on Github if you need help migrating your config file!
Folders have become Locations in organize v2.
folders
must be renamed tolocations
in your config.- REMOVED: The glob syntax (
/Docs/**/*.png
). See Location options. - REMOVED: The exclamation mark exlucde syntax (
! ~/Desktop/exclude
). See Location options. - All keys (filter names, action names, option names) now must be lowercase.
organize v2 uses the Jinja template engine. You may need to change some of your placeholders.
{basedir}
is no longer available.- You have to replace undocumented placeholders like this:
{created.year}-{created.month:02}-{created.day:02}
With this:
{created.strftime('%Y-%m-%d')}
If you need to left pad other numbers you can now use the following syntax:
{ "{:02}".format(your_variable) }
# or
{ '%02d' % your_variable }
filename
is renamed toname
.filesize
is renamed tosize
.created
no longer accepts a timezone and uses the local timezone by default.lastmodified
no longer accepts a timezone and uses the local timezone by default.
The copy, move and rename actions got a whole lot more powerful. You now have several conflict options and can specify exactly how a file should be renamed in case of a conflict.
This means you might need to change your config to use the new parameters.
copy
arguments changed to support conflict resolution options.move
arguments changed to support conflict resolution options.rename
arguments changed to support conflict resolution options.
Example:
rules:
- folders: ~/Desktop
filters:
- extension: pdf
actions:
- move:
dest: ~/Documents/PDFs/
overwrite: false
counter_seperator: "-"
becomes (organize v2):
rules:
- locations: ~/Desktop
filters:
- extension: pdf
actions:
- move:
dest: ~/Documents/PDFs/
on_conflict: rename_new
rename_template: "{name}-{:02}.format(counter){extension}"
If you used move
, copy
or rename
without arguments, nothing changes for you.
That's it. Again, feel free to open a issue if you have trouble migrating your config.