Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change missing folder from hard error to warning #48

Closed
dskaggs opened this issue Sep 21, 2019 · 4 comments
Closed

Change missing folder from hard error to warning #48

dskaggs opened this issue Sep 21, 2019 · 4 comments

Comments

@dskaggs
Copy link

dskaggs commented Sep 21, 2019

Could Organize be updated to handle folders in the config file that are missing from disk without hard crashing the execution? Today, it throws a hard error as such:

ERROR: Path not found: /source/abc/def)
Full traceback at: /root/.cache/organize/log/organize.log

I use a service called FileThis to automatically download statements from several companies I do business with. The folder names sometimes change so I have to keep updating the rules file to even get it to run.

One thought would be to have it output a "WARNING" style message in the output and in the logs with the missing folder info, but continue processing other folders.

For instance, in the following config, if /source/abc/def is missing, we'd get a WARNING message but it would continue to process /source/abc/xyz.

utility_folders: &utility
- '/source/abc/def'
- '/source/abc/xyz'

@tfeldmann
Copy link
Owner

tfeldmann commented Sep 23, 2019

I think this would be a good change. I'll add it to my todo-list.

On a sidenote: Maybe you can tackle this problem by using the glob syntax for folders?

rules:
  - folders:
      # would match all folders ending with "...example"
      - '/source/abc/*example/*'
    actions:
      - echo: '{path}'

@dskaggs
Copy link
Author

dskaggs commented Sep 23, 2019

In my use case the folders are all names of specific accounts and sometimes have a bit of the account number at the end of the name (ex: /Some Financial Institution Account Name (...1234)/). They vary so widely that I don't think a glob match will work here.

@tfeldmann
Copy link
Owner

I just released v1.6.1 with this change 👍

@dskaggs
Copy link
Author

dskaggs commented Oct 25, 2019

Thanks a bunch. I saw that my Docker image automatically rebuilt overnight. As soon as they fix the fiber connection into my house, I’ll pull the latest and give it a whirl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants