Replies: 11 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
My new one:
|
Beta Was this translation helpful? Give feedback.
-
Not very complex, but this is what I use to sync full resolution photos from my Android phone to my Mac via OneDrive. OneDrive copies the pictures into the Camera Roll folder, and by moving them out of this I don't use space on OneDrive for long. # Organize rules for syncing photos and videos from phone via OneDrive
#
# This config is run using a Folder Action in Automator that watches the OneDrive
# Camera Roll folder for new items. They are then moved to My Photos/Year/Month
# folder.
#
# See Organize docs at https://github.com/tfeldmann/organize
rules:
# Move photos into Year/Month folders in My Photos
- folders: ~/OneDrive/Pictures/Camera Roll
filters:
- extension: jpg
- created
actions:
- move: ~/Pictures/My Photos/{created.year}/{created.month:02}/
# Move videos and animated GIFs into Year/Month folders in Movies
- folders: ~/OneDrive/Pictures/Camera Roll
filters:
- extension:
- mp4
- gif
- created
actions:
- move: ~/Movies/My Videos/{created.year}/{created.month:02}/ I then created a Folder Action in Automate that calls organize with this config when items are added to the Camera Roll folder |
Beta Was this translation helpful? Give feedback.
-
This below moves images to Daily directories based on the created date and time
OUTPUT |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Like @kisst I use organize together with Paperless-ngx. In my case, I run it to extract certain information from the file content and push it to Paperless-ngx via its REST API. Details here, config below. # organize configuration file
# https://organize.readthedocs.io
# YAML ANCHORS
# This filters the exact document that has been consumed
.locations: ¤t_document
- path: "{env.DOCUMENT_ARCHIVE_DIR}"
filter:
# Needs to be replaced with e.g. `envsubst`
# as organize doesn't replace environment placeholders in filter
- "$DOCUMENT_ARCHIVE_FILENAME"
# RULES
rules:
- name: "Nabu Casa invoice"
locations: *current_document
filters:
- filecontent: "Nabu Casa"
- filecontent: "(?P<title>Home Assistant Cloud)"
- filecontent: 'Amount due.*(?P<amount>\d{2}\.\d{2})'
actions:
- echo: "Home Assistant hooray"
- shell: "./pngx-update-document.py --url http://localhost:8000 --document-id {env.DOCUMENT_ID} --title '{filecontent.title}' --custom-field-id 1 --custom-field-value {filecontent.amount}"
- echo: "{shell.output}" |
Beta Was this translation helpful? Give feedback.
-
Since there isn't any tracking in organize I don't know what it is mostly used for. So it would be very interesting to see what you use this for and what can be optimized!
Got some clever rules? Show 'em!
Beta Was this translation helpful? Give feedback.
All reactions