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

[DRAFT] Ignore Pattern for file count #71

Closed
wants to merge 2 commits into from
Closed

Conversation

Wastus
Copy link

@Wastus Wastus commented Sep 27, 2023

This is a solution to fix #70.
It's not pretty but it works, though users should test the pattern thoroughly to not exclude to many items.

I've done some rudimentary tests.

@auanasgheps auanasgheps changed the title Dev [DRAFT] Ignore Pattern for file count Sep 28, 2023
tehniemer added a commit to tehniemer/snapraid-aio-script that referenced this pull request Mar 20, 2024
@auanasgheps auanasgheps deleted the branch auanasgheps:dev March 21, 2024 10:11
@tehniemer
Copy link
Contributor

@auanasgheps did you mean to close this?

@auanasgheps
Copy link
Owner

auanasgheps commented Mar 21, 2024

I did not close this. But got closed automatically as dev branch got merged into main.

@auanasgheps auanasgheps reopened this Mar 21, 2024
@auanasgheps auanasgheps deleted the branch auanasgheps:dev April 9, 2024 09:40
@auanasgheps auanasgheps closed this Apr 9, 2024
@tehniemer
Copy link
Contributor

This was closed again when dev was merged.

I have been testing this for a while now and it seems to be working as intended.

@auanasgheps
Copy link
Owner

auanasgheps commented Apr 9, 2024

Apologies, It gets closed automatically when I push dev to master.

@tehniemer do you think we should make it better?

I've never used regex and I can't get a working pattern. Does not seem to be user friendly

@auanasgheps auanasgheps reopened this Apr 9, 2024
@auanasgheps
Copy link
Owner

Ok, maybe I got it: using the example as a reference, the number of the matches is the number of files that will be included after the filter.

If I enter *.mkv in the filter I get 8 matches, none of the matched files contains *.mkv (are 2, which are excluded)

@tehniemer
Copy link
Contributor

I've never used regex and I can't get a working pattern. Does not seem to be user friendly

Regex isn't user friendly at all in my experience, I've always had to use an online regex generator/tester to come up with my filters. This is a pretty advanced function, and a warning should be included for users to take the time to test their patterns and understand the risks.

I've only tested using two partial file paths as I have entire folders that I don't want to be included in the counts, rather than an extension. My understanding is that this will not include anything in counts that includes the pattern in the absolute file path, and it doesn't tell you what's being ignored. It might be a good idea to add a count of files that are being ignored and include that list in the full report.

@tehniemer
Copy link
Contributor

I've been running with this feature for quite a while now and it's been pretty great at filtering out noise from locations that have frequent changes like borg backup and proxmox backup server directories. I have added some additional functionality to my version to log the ignored file count, which is nice to see IMO.

I'm not sure how to properly indicate the changes I made in this PR, so I'll just link to my fork for review.

@auanasgheps
Copy link
Owner

Hi @tehniemer, I would definitely consider your work which logs the ignored file count.

You can make another PR to this repo and we'll mention that @Wastus did the original work

@auanasgheps
Copy link
Owner

I had a look at it, it looks super clean :)

@auanasgheps auanasgheps deleted the branch auanasgheps:dev May 21, 2024 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants