You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I tired to use organize to clean up the backup folders left behind a FF plugin, but even after the python filter returned False ( or None ) it still get included in the action. Based on https://github.com/tfeldmann/organize/blob/main/organize/filters/python.py#L24 it should work, but unsure if I just read the docs wrong.
Environment (please complete the following information):
OS: Debian GNU/Linux 12 (bookworm)
Output of organize --version: v3.3.0
Your config file
rules:
- name: Clean up old FF backupslocations: ~/Downloadstargets: dirsfilters:
- name:
startswith: "STG-backups-FF-"
- python: | import sys, subprocess result = subprocess.run(['flatpak', 'info', 'org.mozilla.firefox'], stdout=subprocess.PIPE) for line in result.stdout.decode('utf-8').split('\n'): if 'Version' in line: firefox_version = line.split(':')[1].strip() break if path.stem.endswith(firefox_version): # sys.exit("Don't do it") return None else: return True return not path.stem.endswith(firefox_version)actions:
- echo: "Would delete {path}"
The text was updated successfully, but these errors were encountered:
Describe the bug
I tired to use organize to clean up the backup folders left behind a FF plugin, but even after the python filter returned False ( or None ) it still get included in the action. Based on https://github.com/tfeldmann/organize/blob/main/organize/filters/python.py#L24 it should work, but unsure if I just read the docs wrong.
Environment (please complete the following information):
organize --version
: v3.3.0Your config file
The text was updated successfully, but these errors were encountered: